]>
Commit | Line | Data |
---|---|---|
beb651ee DM |
1 | include defines.mk |
2 | ||
ff9c5f01 | 3 | export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp) |
7a961fde | 4 | |
beb651ee DM |
5 | DESTDIR= |
6 | ||
2bb03197 | 7 | SUBDIRS = aplinfo PVE bin www |
beb651ee | 8 | |
46c17bd2 | 9 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
80b36896 | 10 | GITVERSION:=$(shell git rev-parse HEAD) |
46c17bd2 DM |
11 | |
12 | DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb | |
beb651ee DM |
13 | |
14 | all: ${SUBDIRS} | |
15 | ||
53f13052 DM |
16 | check: |
17 | ${MAKE} -C bin/test check | |
18 | ||
beb651ee DM |
19 | %: |
20 | set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done | |
21 | ||
beb651ee DM |
22 | .PHONY: dinstall |
23 | dinstall: ${DEB} | |
24 | dpkg -i ${DEB} | |
25 | ||
26 | country.dat: country.pl | |
27 | ./country.pl > country.dat | |
28 | ||
c27e8e49 WB |
29 | .PHONY: deb |
30 | deb: $(DEB) | |
31 | $(DEB): | |
beb651ee DM |
32 | rm -rf dest |
33 | mkdir dest | |
ff9c5f01 | 34 | rsync -a * dest |
ff9c5f01 | 35 | echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE |
8c200508 | 36 | cd dest; dpkg-buildpackage -b -us -uc |
46c17bd2 | 37 | # supress lintian error: statically-linked-binary usr/bin/pvemailforward |
85fd9b52 | 38 | lintian -X binaries ${DEB} |
beb651ee DM |
39 | |
40 | .PHONY: upload | |
53f13052 | 41 | upload: ${DEB} check |
e38a88ca | 42 | ./repoid.pl .git check |
7fffbe32 | 43 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist stretch |
beb651ee | 44 | |
beb651ee | 45 | .PHONY: install |
d88e0b4f | 46 | install: country.dat vzdump.conf vzdump-hook-script.pl pve-apt.conf mtu bridgevlan bridgevlanport vlan vlan-down |
3dad8dc7 DM |
47 | install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy |
48 | install -D -m 0644 debian/pve.logrotate ${DESTDIR}/etc/logrotate.d/pve | |
beb651ee DM |
49 | install -d ${DESTDIR}/usr/share/${PACKAGE} |
50 | install -d ${DESTDIR}/usr/share/man/man1 | |
9ff497a9 | 51 | install -d ${DOCDIR}/examples |
beb651ee DM |
52 | install -d ${DESTDIR}/var/lib/${PACKAGE} |
53 | install -d ${DESTDIR}/var/lib/vz/images | |
54 | install -d ${DESTDIR}/var/lib/vz/template/cache | |
55 | install -d ${DESTDIR}/var/lib/vz/template/iso | |
56 | install -d ${DESTDIR}/var/lib/vz/template/qemu | |
b628df18 | 57 | install -D -m 0644 pve-apt.conf ${DESTDIR}/etc/apt/apt.conf.d/75pveconf |
6765686f | 58 | install -D -m 0644 pve-sources.list ${DESTDIR}/etc/apt/sources.list.d/pve-enterprise.list |
6380143a | 59 | install -D -m 0644 pve-blacklist.conf ${DESTDIR}/etc/modprobe.d/pve-blacklist.conf |
9683831e | 60 | install -D -m 0644 vzdump.conf ${DESTDIR}/etc/vzdump.conf |
c7bee4c6 | 61 | install -D -m 0755 mtu ${DESTDIR}/etc/network/if-up.d/mtu |
1010159a AD |
62 | install -D -m 0755 bridgevlan ${DESTDIR}/etc/network/if-up.d/bridgevlan |
63 | install -D -m 0755 bridgevlanport ${DESTDIR}/etc/network/if-up.d/bridgevlanport | |
64 | install -D -m 0755 vlan ${DESTDIR}/etc/network/if-pre-up.d/vlan | |
65 | install -D -m 0755 vlan-down ${DESTDIR}/etc/network/if-post-down.d/vlan | |
66 | ||
7a26f731 FG |
67 | install -D -m 0644 pve-initramfs.conf ${DESTDIR}/etc/initramfs-tools/conf.d/pve-initramfs.conf |
68 | ||
9ff497a9 | 69 | install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl |
072188dc | 70 | install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh |
beb651ee | 71 | install -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE} |
ff9c5f01 | 72 | |
beb651ee DM |
73 | set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done |
74 | ||
75 | .PHONY: distclean | |
76 | distclean: clean | |
beb651ee DM |
77 | |
78 | .PHONY: clean | |
79 | clean: | |
80 | set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done | |
81 | find . -name '*~' -exec rm {} ';' | |
45868655 | 82 | rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp |