]> git.proxmox.com Git - pve-firewall.git/blobdiff - Makefile
make verbose a global state
[pve-firewall.git] / Makefile
index 3e029e94d54bb202587751b630a8098d930885af..2b2fd8b30fa726a3efa8f1020ea39e60d010cfe8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,54 +1,53 @@
 VERSION=3.0
-PKGREL=14
+PKGREL=19
 
 PACKAGE=pve-firewall
 
-PREFIX=/usr
-BINDIR=${PREFIX}/bin
-SBINDIR=${PREFIX}/sbin
-MANDIR=${PREFIX}/share/man
-DOCDIR=${PREFIX}/share/doc
-MAN1DIR=${MANDIR}/man1/
-PERLDIR=${PREFIX}/share/perl5
+BUILDDIR ?= ${PACKAGE}-${VERSION}
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell git rev-parse HEAD)
 
 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
+DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
+DEB2=${PACKAGE}-dbgsym_${VERSION}-${PKGREL}_${ARCH}.deb
+DEBS=$(DEB) $(DEB2)
 
-all: ${DEB}
+all: $(DEBS)
 
 .PHONY: dinstall
 dinstall: deb
-       dpkg -i ${DEB}
+       dpkg -i $(DEBS)
 
+${BUILDDIR}:
+       rm -rf ${BUILDDIR}
+       rsync -a  src/ debian ${BUILDDIR}
+       echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
 
 .PHONY: deb
-deb: ${DEB}
-${DEB}: src test debian
-       make check
-       rm -rf build
-       rsync -a src/ build
-       rsync -a debian/ build/debian
-       echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
-       # install
-       cd build; dpkg-buildpackage -b -us -uc
-       lintian ${DEB}
+deb: $(DEBS)
+$(DEB2): $(DEB)
+$(DEB): ${BUILDDIR} check
+       cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
+       lintian ${DEBS}
+
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
+       lintian ${DSC}
 
 .PHONY: check
-check: 
+check:
        make -C test check
 
-.PHONY: clean
-clean:         
+.PHONY: clean distclean
+distclean: clean
+clean:
        make -C src clean
        make -C test clean
-       rm -rf *~ debian/*~ example/*~ *.deb *.changes *.buildinfo build ${PACKAGE}-*.tar.gz
-
-.PHONY: distclean
-distclean: clean
-
+       rm -rf *~ debian/*~ example/*~ *.deb *.changes *.buildinfo ${BUILDDIR} ${PACKAGE}*.tar.gz *.dsc
 
 .PHONY: upload
-upload: ${DEB}
-       tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
+upload: $(DEBS)
+       tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}