]> git.proxmox.com Git - pve-manager.git/blob - Makefile
ui: lxc: add firewall log view filtering
[pve-manager.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3 include defines.mk
4
5 export PVERELEASE=${DEB_VERSION_UPSTREAM}
6 export VERSION=${DEB_VERSION_UPSTREAM_REVISION}
7
8 DESTDIR=
9
10 SUBDIRS = aplinfo PVE bin www services configs network-hooks test
11
12 GITVERSION:=$(shell git rev-parse HEAD)
13
14 # possibly set via debian/rules(.env)
15 REPOID?=$(shell git rev-parse --short=8 HEAD)
16
17 DEB=${PACKAGE}_${VERSION}_${DEB_BUILD_ARCH}.deb
18
19 all: ${SUBDIRS}
20 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
21
22 .PHONY: check
23 check: bin test www
24 ${MAKE} -C bin check
25 ${MAKE} -C test check
26 ${MAKE} -C www check
27
28 .PHONY: dinstall
29 dinstall: ${DEB}
30 dpkg -i ${DEB}
31
32 .PHONY: deb
33 deb: $(DEB)
34 $(DEB):
35 rm -rf dest
36 mkdir dest
37 rsync -a * dest
38 echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE
39 echo "REPOID_GENERATED=${REPOID}" > dest/debian/rules.env
40 cd dest; dpkg-buildpackage -b -us -uc
41 # supress lintian error: statically-linked-binary usr/bin/pvemailforward
42 lintian -X binaries ${DEB}
43
44 .PHONY: upload
45 upload: ${DEB} check
46 # check if working directory is clean
47 git diff --exit-code --stat && git diff --exit-code --stat --staged
48 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
49
50 .PHONY: install
51 install: vzdump-hook-script.pl
52 install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
53 install -d ${DOCDIR}/examples
54 install -d ${DESTDIR}/var/lib/${PACKAGE}
55 install -d ${DESTDIR}/var/lib/vz/images
56 install -d ${DESTDIR}/var/lib/vz/template/cache
57 install -d ${DESTDIR}/var/lib/vz/template/iso
58 install -d ${DESTDIR}/var/lib/vz/template/qemu
59 install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
60 install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
61 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
62
63 .PHONY: distclean
64 distclean: clean
65
66 .PHONY: clean
67 clean:
68 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
69 find . -name '*~' -exec rm {} ';'
70 rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp