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