start cluster wide firewall API
[pve-firewall.git] / Makefile
1 RELEASE=3.3
2
3 VERSION=1.0
4 PKGREL=2
5
6 PACKAGE=pve-firewall
7
8 PREFIX=/usr
9 BINDIR=${PREFIX}/bin
10 SBINDIR=${PREFIX}/sbin
11 MANDIR=${PREFIX}/share/man
12 DOCDIR=${PREFIX}/share/doc
13 MAN1DIR=${MANDIR}/man1/
14 PERLDIR=${PREFIX}/share/perl5
15
16 ARCH=amd64
17 GITVERSION:=$(shell cat .git/refs/heads/master)
18
19 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
20
21 all: ${DEB}
22
23 .PHONY: dinstall
24 dinstall: deb
25 dpkg -i ${DEB}
26
27
28 .PHONY: deb
29 deb ${DEB}:
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
38 .PHONY: clean
39 clean:
40 make -C src clean
41 rm -rf *~ debian/*~ example/*~ *.deb *.changes build ${PACKAGE}-*.tar.gz
42
43 .PHONY: distclean
44 distclean: clean
45
46
47 .PHONY: upload
48 upload: ${DEB}
49 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
50 mkdir -p /pve/${RELEASE}/extra
51 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
52 rm -f /pve/${RELEASE}/extra/Packages*
53 cp ${DEB} /pve/${RELEASE}/extra
54 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
55 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro