]> git.proxmox.com Git - pve-installer.git/blob - Makefile
use separate upload targets for different products
[pve-installer.git] / Makefile
1 PKGVER=5.0
2 PKGREL=10
3
4 PVE_DEB=pve-installer_${PKGVER}-${PKGREL}_all.deb
5 PMG_DEB=pmg-installer_${PKGVER}-${PKGREL}_all.deb
6
7 DEBS = ${PVE_DEB} ${PMG_DEB}
8
9 INSTALLER_SOURCES= \
10 unconfigured.sh \
11 fake-start-stop-daemon \
12 policy-disable-rc.d \
13 interfaces \
14 proxlogo.png \
15 checktime \
16 xinitrc \
17 Xdefaults \
18 country.dat \
19 proxinstall
20
21 HTML_SOURCES=$(wildcard html/*.htm)
22 HTML_COMMON_SOURCES=$(wildcard html-common/*.htm) $(wildcard html-common/*.css) $(wildcard html-common/*.png)
23
24 all: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
25
26 country.dat: country.pl
27 ./country.pl > country.dat
28
29 deb: ${DEBS}
30 ${DEBS}: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
31 rsync -a * build
32 cd build; dpkg-buildpackage -b -us -uc
33 lintian -X man ${PVE_DEB}
34 lintian -X man ${PMG_DEB}
35
36 .phony: install
37 install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
38 make -C html-common install
39 install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
40 mkdir -p ${DESTDIR}/var/lib/dhcp3/
41 ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf
42 ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf.dhclient-new
43 install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon
44 install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d
45 install -D -m 644 country.dat ${DESTDIR}/var/lib/pve-installer/country.dat
46 install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh
47 install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall
48 install -D -m 755 checktime ${DESTDIR}/usr/bin/checktime
49 install -D -m 644 xinitrc ${DESTDIR}/.xinitrc
50 install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults
51
52 .phony: upload-pmg
53 upload-pmg: ${PMG_DEB}
54 tar cf - ${PMG_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
55
56 .phony: upload-pve
57 upload-pve: ${PVE_DEB}
58 tar cf - ${PVE_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
59
60 test.img:
61 dd if=/dev/zero of=test.img bs=2048 count=1M
62
63 check-pve: ${PVE_DEB} test.img
64 rm -rf testdir
65 dpkg -X ${PVE_DEB} testdir
66 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
67
68 check-pmg: ${PMG_DEB} test.img
69 rm -rf testdir
70 dpkg -X ${PMG_DEB} testdir
71 G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
72
73 .phony: clean
74 clean:
75 make -C html-common clean
76 rm -rf *~ *.deb target build packages packages.tmp testdir test.img pve-final.pkglist *.buildinfo *.changes country.dat
77 find . -name '*~' -exec rm {} ';'