bump version to 3.0-10
[pve-common.git] / Makefile
1 RELEASE=3.1
2
3 VERSION=3.0
4 PKGREL=10
5
6 PACKAGE=libpve-common-perl
7
8 PREFIX=/usr
9 BINDIR=${PREFIX}/bin
10 MANDIR=${PREFIX}/share/man
11 DOCDIR=${PREFIX}/share/doc
12 MAN1DIR=${MANDIR}/man1/
13 PERLDIR=${PREFIX}/share/perl5
14
15 ARCH=all
16 GITVERSION:=$(shell cat .git/refs/heads/master)
17
18 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
19
20 all: ${DEB}
21
22 .PHONY: dinstall
23 dinstall: deb
24 dpkg -i ${DEB}
25
26
27 .PHONY: deb
28 deb ${DEB}:
29 rm -rf build
30 rsync -a data/ build
31 rsync -a debian/ build/debian
32 echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
33 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
34 lintian ${DEB}
35
36 .PHONY: clean
37 clean:
38 rm -rf *~ *.deb *.changes build ${PACKAGE}-*.tar.gz
39
40 .PHONY: distclean
41 distclean: clean
42
43
44 .PHONY: upload
45 upload: ${DEB}
46 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
47 mkdir -p /pve/${RELEASE}/extra
48 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
49 rm -f /pve/${RELEASE}/extra/Packages*
50 cp ${DEB} /pve/${RELEASE}/extra
51 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
52 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
53