]> git.proxmox.com Git - pve-manager.git/blob - Makefile
trust StartCom_Certification_Authority_2.crt
[pve-manager.git] / Makefile
1 include defines.mk
2
3 export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
4
5 DESTDIR=
6
7 SUBDIRS = aplinfo PVE bin www po
8
9 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
10 GITVERSION:=$(shell cat .git/refs/heads/master)
11
12 DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
13
14 all: ${SUBDIRS}
15
16 check:
17 ${MAKE} -C bin/test check
18
19 %:
20 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
21
22 .PHONY: dinstall
23 dinstall: ${DEB}
24 dpkg -i ${DEB}
25
26 country.dat: country.pl
27 ./country.pl > country.dat
28
29 .PHONY: deb
30 deb: $(DEB)
31 $(DEB):
32 rm -rf dest
33 mkdir dest
34 rsync -a * dest
35 echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE
36 cd dest; dpkg-buildpackage -b -us -uc
37 # supress lintian error: statically-linked-binary usr/bin/pvemailforward
38 # we have a certs in /usr/local/, so we need to disbale files check
39 lintian -X 'binaries,files' ${DEB}
40
41 .PHONY: upload
42 upload: ${DEB} check
43 ./repoid.pl .git check
44 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist stretch
45
46 #.PHONY: poupload
47 #poupload:
48 # rsync po/*.po po/pve-manager.pot pve.proxmox.com:/home/ftp/sources/po-files/
49
50 .PHONY: install
51 install: country.dat vzdump.conf vzdump-hook-script.pl pve-apt.conf mtu bridgevlan bridgevlanport vlan vlan-down
52 install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
53 install -D -m 0644 debian/pve.logrotate ${DESTDIR}/etc/logrotate.d/pve
54 install -d ${DESTDIR}/usr/share/${PACKAGE}
55 install -d ${DESTDIR}/usr/share/man/man1
56 install -d ${DOCDIR}/examples
57 install -d ${DESTDIR}/var/lib/${PACKAGE}
58 install -d ${DESTDIR}/var/lib/vz/images
59 install -d ${DESTDIR}/var/lib/vz/template/cache
60 install -d ${DESTDIR}/var/lib/vz/template/iso
61 install -d ${DESTDIR}/var/lib/vz/template/qemu
62 install -d ${DESTDIR}/usr/local/share/ca-certificates
63 install -m 0644 StartCom_Certification_Authority_2.crt ${DESTDIR}/usr/local/share/ca-certificates/startcom-ca2.crt
64 install -D -m 0644 pve-apt.conf ${DESTDIR}/etc/apt/apt.conf.d/75pveconf
65 install -D -m 0644 pve-sources.list ${DESTDIR}/etc/apt/sources.list.d/pve-enterprise.list
66 install -D -m 0644 pve-blacklist.conf ${DESTDIR}/etc/modprobe.d/pve-blacklist.conf
67 install -D -m 0644 vzdump.conf ${DESTDIR}/etc/vzdump.conf
68 install -D -m 0755 mtu ${DESTDIR}/etc/network/if-up.d/mtu
69 install -D -m 0755 bridgevlan ${DESTDIR}/etc/network/if-up.d/bridgevlan
70 install -D -m 0755 bridgevlanport ${DESTDIR}/etc/network/if-up.d/bridgevlanport
71 install -D -m 0755 vlan ${DESTDIR}/etc/network/if-pre-up.d/vlan
72 install -D -m 0755 vlan-down ${DESTDIR}/etc/network/if-post-down.d/vlan
73
74 install -D -m 0644 pve-initramfs.conf ${DESTDIR}/etc/initramfs-tools/conf.d/pve-initramfs.conf
75
76 install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
77 install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
78 install -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE}
79
80 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
81
82 .PHONY: distclean
83 distclean: clean
84
85 .PHONY: clean
86 clean:
87 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
88 find . -name '*~' -exec rm {} ';'
89 rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp