cleanup firewall service implementation
[pve-firewall.git] / Makefile
CommitLineData
81a1a258 1RELEASE=3.2
bb272dd3
DM
2
3VERSION=1.0
ba0b3a0a 4PKGREL=2
bb272dd3
DM
5
6PACKAGE=pve-firewall
7
8PREFIX=/usr
9BINDIR=${PREFIX}/bin
10SBINDIR=${PREFIX}/sbin
11MANDIR=${PREFIX}/share/man
12DOCDIR=${PREFIX}/share/doc
13MAN1DIR=${MANDIR}/man1/
14PERLDIR=${PREFIX}/share/perl5
15
ba0b3a0a 16ARCH=amd64
bb272dd3
DM
17GITVERSION:=$(shell cat .git/refs/heads/master)
18
19DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
20
21all: ${DEB}
22
23.PHONY: dinstall
24dinstall: deb
25 dpkg -i ${DEB}
26
27
28.PHONY: deb
ebb20753 29deb ${DEB}: check
bb272dd3
DM
30 rm -rf build
31 rsync -a src/ build
32 rsync -a debian/ build/debian
33 echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
34 # install
35 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
36 lintian ${DEB}
37
ebb20753
DM
38.PHONY: check
39check:
40 make -C test check
41
bb272dd3
DM
42.PHONY: clean
43clean:
3f665549 44 make -C src clean
ebb20753 45 make -C test clean
3f665549 46 rm -rf *~ debian/*~ example/*~ *.deb *.changes build ${PACKAGE}-*.tar.gz
bb272dd3
DM
47
48.PHONY: distclean
49distclean: clean
50
51
52.PHONY: upload
53upload: ${DEB}
54 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
55 mkdir -p /pve/${RELEASE}/extra
56 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
57 rm -f /pve/${RELEASE}/extra/Packages*
58 cp ${DEB} /pve/${RELEASE}/extra
59 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
60 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro