X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=Makefile;h=2b2fd8b30fa726a3efa8f1020ea39e60d010cfe8;hp=ee9ff724bf5f11dd29da0e5532073109f4e121a3;hb=585ede439c205271353a17b64ad89da717df87fc;hpb=45f206fd29da5ee11ffb09ea2d0902b4a9363aed diff --git a/Makefile b/Makefile index ee9ff72..2b2fd8b 100644 --- a/Makefile +++ b/Makefile @@ -1,52 +1,53 @@ -VERSION=2.0 -PKGREL=31 +VERSION=3.0 +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=amd64 -GITVERSION:=$(shell cat .git/refs/heads/master) +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}: 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 -rfakeroot -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 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 +upload: $(DEBS) + tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}