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