recompile for debian jessie, bump version to 2.0-1
[pve-firewall.git] / Makefile
1 RELEASE=4.0
2
3 VERSION=2.0
4 PKGREL=1
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}: check
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: check
39 check: 
40         make -C test check
41
42 .PHONY: clean
43 clean:  
44         make -C src clean
45         make -C test clean
46         rm -rf *~ debian/*~ example/*~ *.deb *.changes build ${PACKAGE}-*.tar.gz
47
48 .PHONY: distclean
49 distclean: clean
50
51
52 .PHONY: upload
53 upload: ${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