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