]>
Commit | Line | Data |
---|---|---|
dad62fce | 1 | include /usr/share/dpkg/pkg-info.mk |
6db9b06a | 2 | |
c2f72dd6 | 3 | DEB=proxmox-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb |
89a12446 DM |
4 | |
5 | INSTALLER_SOURCES= \ | |
6 | unconfigured.sh \ | |
89a12446 | 7 | fake-start-stop-daemon \ |
c1cfbb1c | 8 | policy-disable-rc.d \ |
89a12446 | 9 | interfaces \ |
89a12446 | 10 | checktime \ |
f6ba5aa4 | 11 | xinitrc \ |
09cc3546 | 12 | spice-vdagent.sh \ |
f6ba5aa4 | 13 | Xdefaults \ |
f0583fd4 | 14 | country.dat \ |
89a12446 DM |
15 | proxinstall |
16 | ||
44610685 DM |
17 | HTML_SOURCES=$(wildcard html/*.htm) |
18 | HTML_COMMON_SOURCES=$(wildcard html-common/*.htm) $(wildcard html-common/*.css) $(wildcard html-common/*.png) | |
89a12446 | 19 | |
f0583fd4 DM |
20 | all: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES} |
21 | ||
22 | country.dat: country.pl | |
23 | ./country.pl > country.dat | |
780479c5 | 24 | |
c2f72dd6 TL |
25 | deb: ${DEB} |
26 | ${DEB}: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES} | |
bf1de878 | 27 | rsync --exclude='test*.img' -a * build |
c5582ca4 | 28 | cd build; dpkg-buildpackage -b -us -uc |
c2f72dd6 TL |
29 | lintian ${DEB} |
30 | ||
31 | DESTDIR= | |
32 | VARLIBDIR=$(DESTDIR)/var/lib/proxmox-installer | |
33 | HTMLDIR=$(VARLIBDIR)/html/common | |
89a12446 | 34 | |
c2f72dd6 | 35 | .PHONY: install |
44610685 | 36 | install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES} |
c2f72dd6 | 37 | $(MAKE) -C banner install |
89a12446 | 38 | install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces |
c2f72dd6 TL |
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 | |
89a12446 DM |
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 | |
fb7bdbd4 | 46 | install -D -m 755 spice-vdagent.sh ${DESTDIR}/.spice-vdagent.sh |
89a12446 | 47 | install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults |
89a12446 | 48 | |
c2f72dd6 | 49 | %-banner.png: %-banner.svg |
9b9ddfce | 50 | rsvg-convert -o $@ $< |
782b4acd | 51 | |
c2f72dd6 TL |
52 | .PHONY: upload |
53 | upload: ${DEB} | |
54 | tar cf - ${PMG_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye | |
89a12446 | 55 | |
76960140 TL |
56 | %.img: |
57 | truncate -s 2G $@ | |
89a12446 | 58 | |
c2f72dd6 TL |
59 | .PHONY: prepare-check-env |
60 | prepare-check-env: $(DEB) | |
56510a19 | 61 | umount -Rd testdir || true |
92cbd446 | 62 | rm -rf testdir |
c2f72dd6 TL |
63 | dpkg -X $(DEB) testdir |
64 | ||
65 | check-pve: prepare-check-env test.img | |
66 | printf '%s\n' "PRODUCT='pve'" >cd-info.test | |
92cbd446 | 67 | G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img |
89a12446 | 68 | |
c2f72dd6 TL |
69 | check-pve-multidisks: prepare-check-env test.img test2.img test3.img test4.img |
70 | printf '%s\n' "PRODUCT='pve'" >cd-info.test | |
76960140 TL |
71 | G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img,test2.img,test3.img,test4.img |
72 | ||
c2f72dd6 TL |
73 | check-pmg: prepare-check-env test.img |
74 | printf '%s\n' "PRODUCT='pmg'" >cd-info.test | |
a8213c0e DM |
75 | G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img |
76 | ||
c2f72dd6 TL |
77 | check-pbs: prepare-check-env test.img |
78 | printf '%s\n' "PRODUCT='pbs'" >cd-info.test | |
53748662 OB |
79 | G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img |
80 | ||
81 | ||
89a12446 DM |
82 | .phony: clean |
83 | clean: | |
56510a19 | 84 | umount -Rd testdir || true |
c9b46f90 TL |
85 | rm -rf *~ *.deb target build packages packages.tmp testdir test*.img pve-final.pkglist \ |
86 | *.buildinfo *.changes country.dat final.pkglist cd-info.test | |
b1e23923 | 87 | find . -name '*~' -exec rm {} ';' |