buildsys: correctly cleanup source tarball
[pve-firewall.git] / Makefile
CommitLineData
29a94c79 1VERSION=3.0
d8ea08e3 2PKGREL=18
bb272dd3
DM
3
4PACKAGE=pve-firewall
5
43be6155 6BUILDDIR ?= ${PACKAGE}-${VERSION}
bb272dd3 7
43e33825 8ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
4382be0a 9GITVERSION:=$(shell git rev-parse HEAD)
bb272dd3
DM
10
11DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
95ed90a9 12DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
05018f6e
WB
13DEB2=${PACKAGE}-dbgsym_${VERSION}-${PKGREL}_${ARCH}.deb
14DEBS=$(DEB) $(DEB2)
bb272dd3 15
05018f6e 16all: $(DEBS)
bb272dd3
DM
17
18.PHONY: dinstall
19dinstall: deb
05018f6e 20 dpkg -i $(DEBS)
bb272dd3 21
43be6155
TL
22${BUILDDIR}:
23 rm -rf ${BUILDDIR}
24 rsync -a src/ debian ${BUILDDIR}
25 echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
bb272dd3
DM
26
27.PHONY: deb
05018f6e
WB
28deb: $(DEBS)
29$(DEB2): $(DEB)
43be6155
TL
30$(DEB): ${BUILDDIR} check
31 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
05018f6e 32 lintian ${DEBS}
bb272dd3 33
95ed90a9
TL
34.PHONY: dsc
35dsc: ${DSC}
36${DSC}: ${BUILDDIR}
37 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
38 lintian ${DSC}
39
ebb20753 40.PHONY: check
43be6155 41check:
ebb20753
DM
42 make -C test check
43
43be6155
TL
44.PHONY: clean distclean
45distclean: clean
46clean:
3f665549 47 make -C src clean
ebb20753 48 make -C test clean
115b38dc 49 rm -rf *~ debian/*~ example/*~ *.deb *.changes *.buildinfo ${BUILDDIR} ${PACKAGE}*.tar.gz *.dsc
bb272dd3
DM
50
51.PHONY: upload
05018f6e
WB
52upload: $(DEBS)
53 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}