]> git.proxmox.com Git - pve-installer.git/blob - Makefile
improve spice integration
[pve-installer.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PVE_DEB=pve-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
4 PMG_DEB=pmg-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
5 PBS_DEB=pbs-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
6
7 DEBS = ${PVE_DEB} ${PMG_DEB} ${PBS_DEB}
8
9 INSTALLER_SOURCES= \
10 unconfigured.sh \
11 fake-start-stop-daemon \
12 policy-disable-rc.d \
13 interfaces \
14 pmg-banner.png \
15 pve-banner.png \
16 pbs-banner.png \
17 checktime \
18 xinitrc \
19 spice-vdagent.sh \
20 Xdefaults \
21 country.dat \
22 proxinstall
23
24 HTML_SOURCES=$(wildcard html/*.htm)
25 HTML_COMMON_SOURCES=$(wildcard html-common/*.htm) $(wildcard html-common/*.css) $(wildcard html-common/*.png)
26
27 all: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
28
29 country.dat: country.pl
30 ./country.pl > country.dat
31
32 deb: ${DEBS}
33 ${DEBS}: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
34 rsync --exclude='test*.img' -a * build
35 cd build; dpkg-buildpackage -b -us -uc
36 lintian -X man ${PVE_DEB}
37 lintian -X man ${PMG_DEB}
38 lintian -X man ${PBS_DEB}
39
40 .phony: install
41 install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
42 make -C html-common install
43 install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
44 install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon
45 install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d
46 install -D -m 644 country.dat ${DESTDIR}/var/lib/pve-installer/country.dat
47 install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh
48 install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall
49 install -D -m 755 checktime ${DESTDIR}/usr/bin/checktime
50 install -D -m 644 xinitrc ${DESTDIR}/.xinitrc
51 install -D -m 644 spice-vdagent.sh ${DESTDIR}/.spice-vdagent.sh
52 install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults
53
54 pmg-banner.png: pmg-banner.svg
55 rsvg-convert -o $@ $<
56
57 pve-banner.png: pve-banner.svg
58 rsvg-convert -o $@ $<
59
60 pbs-banner.png: pbs-banner.svg
61 rsvg-convert -o $@ $<
62
63 .phony: upload-pmg
64 upload-pmg: ${PMG_DEB}
65 tar cf - ${PMG_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
66
67 .phony: upload-pve
68 upload-pve: ${PVE_DEB}
69 tar cf - ${PVE_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster
70
71 %.img:
72 truncate -s 2G $@
73
74 check-pve: ${PVE_DEB} test.img
75 umount -Rd testdir || true
76 rm -rf testdir
77 dpkg -X ${PVE_DEB} testdir
78 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
79
80 check-pve-multidisks: ${PVE_DEB} test.img test2.img test3.img test4.img
81 umount -Rd testdir || true
82 rm -rf testdir
83 dpkg -X ${PVE_DEB} testdir
84 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img,test2.img,test3.img,test4.img
85
86 check-pmg: ${PMG_DEB} test.img
87 umount -Rd testdir || true
88 rm -rf testdir
89 dpkg -X ${PMG_DEB} testdir
90 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
91
92 check-pbs: ${PBS_DEB} test.img
93 umount -Rd testdir || true
94 rm -rf testdir
95 dpkg -X ${PBS_DEB} testdir
96 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
97
98
99 .phony: clean
100 clean:
101 umount -Rd testdir || true
102 make -C html-common clean
103 rm -rf *~ *.deb target build packages packages.tmp testdir test*.img pve-final.pkglist *.buildinfo *.changes country.dat final.pkglist
104 find . -name '*~' -exec rm {} ';'