]> git.proxmox.com Git - pve-common.git/blob - Makefile
export bond_modes (define with 'our' instead of 'my')
[pve-common.git] / Makefile
1 RELEASE=4.2
2
3 VERSION=4.0
4 PKGREL=63
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 $(MAKE) -C test 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-common.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
34 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
35 lintian ${DEB}
36
37 .PHONY: clean
38 clean:
39 rm -rf *~ *.deb *.changes build ${PACKAGE}-*.tar.gz
40
41 .PHONY: distclean
42 distclean: clean
43
44 .PHONY: check
45 check:
46 $(MAKE) -C test check
47
48 .PHONY: upload
49 upload: ${DEB}
50 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
51 mkdir -p /pve/${RELEASE}/extra
52 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
53 rm -f /pve/${RELEASE}/extra/Packages*
54 cp ${DEB} /pve/${RELEASE}/extra
55 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
56 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
57