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