]> git.proxmox.com Git - pve-manager-legacy.git/blame - Makefile
cleanup: add network-hooks directory and move respective files
[pve-manager-legacy.git] / Makefile
CommitLineData
c3731ed2
DM
1include defines.mk
2
dd147b56 3export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
593cd555 4
c3731ed2
DM
5DESTDIR=
6
bf25a4c1 7SUBDIRS = aplinfo PVE bin www services configs network-hooks
c3731ed2 8
eceb9171 9ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
85e14dcd 10GITVERSION:=$(shell git rev-parse HEAD)
eceb9171
DM
11
12DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
c3731ed2
DM
13
14all: ${SUBDIRS}
15
8372a03e
DM
16check:
17 ${MAKE} -C bin/test check
18
c3731ed2
DM
19.PHONY: dinstall
20dinstall: ${DEB}
21 dpkg -i ${DEB}
22
8d676c8a
WB
23.PHONY: deb
24deb: $(DEB)
25$(DEB):
c3731ed2
DM
26 rm -rf dest
27 mkdir dest
dd147b56 28 rsync -a * dest
dd147b56 29 echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE
f86235f1 30 cd dest; dpkg-buildpackage -b -us -uc
eceb9171 31 # supress lintian error: statically-linked-binary usr/bin/pvemailforward
088597a3 32 lintian -X binaries ${DEB}
c3731ed2
DM
33
34.PHONY: upload
8372a03e 35upload: ${DEB} check
24def72f
TL
36 # check if working directory is clean
37 git diff --exit-code --stat && git diff --exit-code --stat --staged
f2a992e0 38 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist stretch
c3731ed2 39
c3731ed2 40.PHONY: install
bf25a4c1 41install: vzdump-hook-script.pl
4b73743a 42 install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
c3731ed2
DM
43 install -d ${DESTDIR}/usr/share/${PACKAGE}
44 install -d ${DESTDIR}/usr/share/man/man1
99118d54 45 install -d ${DOCDIR}/examples
c3731ed2
DM
46 install -d ${DESTDIR}/var/lib/${PACKAGE}
47 install -d ${DESTDIR}/var/lib/vz/images
48 install -d ${DESTDIR}/var/lib/vz/template/cache
49 install -d ${DESTDIR}/var/lib/vz/template/iso
50 install -d ${DESTDIR}/var/lib/vz/template/qemu
99118d54 51 install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
b282dec2 52 install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
c3731ed2
DM
53 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
54
55.PHONY: distclean
56distclean: clean
c3731ed2
DM
57
58.PHONY: clean
59clean:
60 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
61 find . -name '*~' -exec rm {} ';'
614dfac4 62 rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp