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