bump version to 3.0-10
[pve-firewall.git] / Makefile
1 VERSION=3.0
2 PKGREL=10
3
4 PACKAGE=pve-firewall
5
6 PREFIX=/usr
7 BINDIR=${PREFIX}/bin
8 SBINDIR=${PREFIX}/sbin
9 MANDIR=${PREFIX}/share/man
10 DOCDIR=${PREFIX}/share/doc
11 MAN1DIR=${MANDIR}/man1/
12 PERLDIR=${PREFIX}/share/perl5
13
14 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
15 GITVERSION:=$(shell git rev-parse HEAD)
16
17 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
18
19 all: ${DEB}
20
21 .PHONY: dinstall
22 dinstall: deb
23         dpkg -i ${DEB}
24
25
26 .PHONY: deb
27 deb: ${DEB}
28 ${DEB}: src test debian
29         make 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 -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 *.buildinfo build ${PACKAGE}-*.tar.gz
47
48 .PHONY: distclean
49 distclean: clean
50
51
52 .PHONY: upload
53 upload: ${DEB}
54         tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}