| 1 | VERSION=3.0 |
| 2 | PKGREL=18 |
| 3 | |
| 4 | PACKAGE=pve-firewall |
| 5 | |
| 6 | BUILDDIR ?= ${PACKAGE}-${VERSION} |
| 7 | |
| 8 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
| 9 | GITVERSION:=$(shell git rev-parse HEAD) |
| 10 | |
| 11 | DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb |
| 12 | DEB2=${PACKAGE}-dbgsym_${VERSION}-${PKGREL}_${ARCH}.deb |
| 13 | DEBS=$(DEB) $(DEB2) |
| 14 | |
| 15 | all: $(DEBS) |
| 16 | |
| 17 | .PHONY: dinstall |
| 18 | dinstall: deb |
| 19 | dpkg -i $(DEBS) |
| 20 | |
| 21 | ${BUILDDIR}: |
| 22 | rm -rf ${BUILDDIR} |
| 23 | rsync -a src/ debian ${BUILDDIR} |
| 24 | echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE |
| 25 | |
| 26 | .PHONY: deb |
| 27 | deb: $(DEBS) |
| 28 | $(DEB2): $(DEB) |
| 29 | $(DEB): ${BUILDDIR} check |
| 30 | cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc |
| 31 | lintian ${DEBS} |
| 32 | |
| 33 | .PHONY: check |
| 34 | check: |
| 35 | make -C test check |
| 36 | |
| 37 | .PHONY: clean distclean |
| 38 | distclean: clean |
| 39 | clean: |
| 40 | make -C src clean |
| 41 | make -C test clean |
| 42 | rm -rf *~ debian/*~ example/*~ *.deb *.changes *.buildinfo ${BUILDDIR} ${PACKAGE}-*.tar.gz |
| 43 | |
| 44 | .PHONY: upload |
| 45 | upload: $(DEBS) |
| 46 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH} |