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