add README and example to debian package
[pve-firewall.git] / Makefile
CommitLineData
bb272dd3
DM
1RELEASE=3.3
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
ba0b3a0a 29deb ${DEB}:
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
38.PHONY: clean
39clean:
3f665549
DM
40 make -C src clean
41 rm -rf *~ debian/*~ example/*~ *.deb *.changes build ${PACKAGE}-*.tar.gz
bb272dd3
DM
42
43.PHONY: distclean
44distclean: clean
45
46
47.PHONY: upload
48upload: ${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