X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=Makefile;h=c98886d1de8d78524df55c4e70f0f49a5e57b92b;hp=9cd78913f47fe80f07e95b6b87824317d3e8854f;hb=cb161529c65c0c41056d3eeb4370e80990df8b99;hpb=05018f6e8b9b8cc8ea74425f2d59c57f6d81b469 diff --git a/Makefile b/Makefile index 9cd7891..c98886d 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,14 @@ -VERSION=3.0 -PKGREL=17 +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk 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 - -ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} GITVERSION:=$(shell git rev-parse HEAD) -DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb -DEB2=${PACKAGE}-dbgsym_${VERSION}-${PKGREL}_${ARCH}.deb +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb +DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc +DEB2=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb DEBS=$(DEB) $(DEB2) all: $(DEBS) @@ -24,34 +17,35 @@ all: $(DEBS) dinstall: 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: $(DEBS) $(DEB2): $(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 +$(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: $(DEBS) - tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH} + tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${DEB_BUILD_ARCH}