]> git.proxmox.com Git - pve-installer.git/blame - Makefile
bump version to 6.1-4
[pve-installer.git] / Makefile
CommitLineData
dad62fce 1include /usr/share/dpkg/pkg-info.mk
6db9b06a 2
dad62fce
TL
3PVE_DEB=pve-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
4PMG_DEB=pmg-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
53748662 5PBS_DEB=pbs-installer_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
a8213c0e 6
53748662 7DEBS = ${PVE_DEB} ${PMG_DEB} ${PBS_DEB}
89a12446
DM
8
9INSTALLER_SOURCES= \
10 unconfigured.sh \
89a12446 11 fake-start-stop-daemon \
c1cfbb1c 12 policy-disable-rc.d \
89a12446 13 interfaces \
782b4acd
DM
14 pmg-banner.png \
15 pve-banner.png \
53748662 16 pbs-banner.png \
89a12446 17 checktime \
f6ba5aa4 18 xinitrc \
09cc3546 19 spice-vdagent.sh \
f6ba5aa4 20 Xdefaults \
f0583fd4 21 country.dat \
89a12446
DM
22 proxinstall
23
44610685
DM
24HTML_SOURCES=$(wildcard html/*.htm)
25HTML_COMMON_SOURCES=$(wildcard html-common/*.htm) $(wildcard html-common/*.css) $(wildcard html-common/*.png)
89a12446 26
f0583fd4
DM
27all: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
28
29country.dat: country.pl
30 ./country.pl > country.dat
780479c5 31
53748662 32deb: ${DEBS}
a8213c0e 33${DEBS}: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
bf1de878 34 rsync --exclude='test*.img' -a * build
c5582ca4 35 cd build; dpkg-buildpackage -b -us -uc
6db9b06a 36 lintian -X man ${PVE_DEB}
a8213c0e 37 lintian -X man ${PMG_DEB}
53748662 38 lintian -X man ${PBS_DEB}
89a12446
DM
39
40.phony: install
44610685
DM
41install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
42 make -C html-common install
89a12446 43 install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
89a12446 44 install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon
c1cfbb1c 45 install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d
790a4be9 46 install -D -m 644 country.dat ${DESTDIR}/var/lib/pve-installer/country.dat
89a12446
DM
47 install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh
48 install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall
49 install -D -m 755 checktime ${DESTDIR}/usr/bin/checktime
50 install -D -m 644 xinitrc ${DESTDIR}/.xinitrc
fb7bdbd4 51 install -D -m 755 spice-vdagent.sh ${DESTDIR}/.spice-vdagent.sh
89a12446 52 install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults
89a12446 53
782b4acd 54pmg-banner.png: pmg-banner.svg
9b9ddfce 55 rsvg-convert -o $@ $<
782b4acd
DM
56
57pve-banner.png: pve-banner.svg
9b9ddfce 58 rsvg-convert -o $@ $<
782b4acd 59
53748662
OB
60pbs-banner.png: pbs-banner.svg
61 rsvg-convert -o $@ $<
62
27533adb
DM
63.phony: upload-pmg
64upload-pmg: ${PMG_DEB}
65 tar cf - ${PMG_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
66
67.phony: upload-pve
68upload-pve: ${PVE_DEB}
292dd984 69 tar cf - ${PVE_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster
89a12446 70
76960140
TL
71%.img:
72 truncate -s 2G $@
89a12446 73
6db9b06a 74check-pve: ${PVE_DEB} test.img
56510a19 75 umount -Rd testdir || true
92cbd446 76 rm -rf testdir
6db9b06a 77 dpkg -X ${PVE_DEB} testdir
92cbd446 78 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
89a12446 79
76960140 80check-pve-multidisks: ${PVE_DEB} test.img test2.img test3.img test4.img
56510a19 81 umount -Rd testdir || true
76960140
TL
82 rm -rf testdir
83 dpkg -X ${PVE_DEB} testdir
84 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img,test2.img,test3.img,test4.img
85
a8213c0e 86check-pmg: ${PMG_DEB} test.img
56510a19 87 umount -Rd testdir || true
a8213c0e
DM
88 rm -rf testdir
89 dpkg -X ${PMG_DEB} testdir
90 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
91
53748662
OB
92check-pbs: ${PBS_DEB} test.img
93 umount -Rd testdir || true
94 rm -rf testdir
95 dpkg -X ${PBS_DEB} testdir
96 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
97
98
89a12446
DM
99.phony: clean
100clean:
56510a19 101 umount -Rd testdir || true
44610685 102 make -C html-common clean
76960140 103 rm -rf *~ *.deb target build packages packages.tmp testdir test*.img pve-final.pkglist *.buildinfo *.changes country.dat final.pkglist
b1e23923 104 find . -name '*~' -exec rm {} ';'