buildsys: use dpkg-architecture
[pve-firewall.git] / Makefile
CommitLineData
0b18ebe8 1VERSION=2.0
df67a3dc 2PKGREL=33
bb272dd3
DM
3
4PACKAGE=pve-firewall
5
6PREFIX=/usr
7BINDIR=${PREFIX}/bin
8SBINDIR=${PREFIX}/sbin
9MANDIR=${PREFIX}/share/man
10DOCDIR=${PREFIX}/share/doc
11MAN1DIR=${MANDIR}/man1/
12PERLDIR=${PREFIX}/share/perl5
13
43e33825 14ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
bb272dd3
DM
15GITVERSION:=$(shell cat .git/refs/heads/master)
16
17DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
18
19all: ${DEB}
20
21.PHONY: dinstall
22dinstall: deb
23 dpkg -i ${DEB}
24
25
26.PHONY: deb
567c9e27
WB
27deb: ${DEB}
28${DEB}: check
bb272dd3
DM
29 rm -rf build
30 rsync -a src/ build
31 rsync -a debian/ build/debian
32 echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
33 # install
34 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
35 lintian ${DEB}
36
ebb20753
DM
37.PHONY: check
38check:
39 make -C test check
40
bb272dd3
DM
41.PHONY: clean
42clean:
3f665549 43 make -C src clean
ebb20753 44 make -C test clean
3f665549 45 rm -rf *~ debian/*~ example/*~ *.deb *.changes build ${PACKAGE}-*.tar.gz
bb272dd3
DM
46
47.PHONY: distclean
48distclean: clean
49
50
51.PHONY: upload
52upload: ${DEB}
a9e7f1bd 53 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload