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