tests: list/create/update network interfaces
[pve-common.git] / Makefile
CommitLineData
47e4eb11 1RELEASE=4.0
e143e9d8 2
47e4eb11 3VERSION=4.0
dc1c21d3 4PKGREL=8
e143e9d8
DM
5
6PACKAGE=libpve-common-perl
7
8PREFIX=/usr
9BINDIR=${PREFIX}/bin
10MANDIR=${PREFIX}/share/man
11DOCDIR=${PREFIX}/share/doc
12MAN1DIR=${MANDIR}/man1/
13PERLDIR=${PREFIX}/share/perl5
14
15ARCH=all
b98a06a3
DM
16GITVERSION:=$(shell cat .git/refs/heads/master)
17
e143e9d8
DM
18DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
19
20all: ${DEB}
21
22.PHONY: dinstall
23dinstall: deb
24 dpkg -i ${DEB}
25
26
27.PHONY: deb
28deb ${DEB}:
29 rm -rf build
b51b16e6 30 rsync -a src/ build
d405237d 31 rsync -a debian/ build/debian
b98a06a3 32 echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
e143e9d8
DM
33 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
34 lintian ${DEB}
35
36.PHONY: clean
37clean:
38 rm -rf *~ *.deb *.changes build ${PACKAGE}-*.tar.gz
39
40.PHONY: distclean
41distclean: clean
42
936218b8
WB
43.PHONY: check
44check:
45 $(MAKE) -C test check
e143e9d8
DM
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
56