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