]> git.proxmox.com Git - pve-installer.git/blob - Makefile
copied country.pl form pve-manager
[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} Makefile html/Makefile
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 packages: /pve/${RELEASE}/install/pve.files
53 rm -rf packages packages.tmp; mkdir packages.tmp
54 for i in `cat $<`; do install -m 644 $$i packages.tmp/; done
55 mv packages.tmp packages
56
57 test.img:
58 dd if=/dev/zero of=test.img bs=2048 count=1M
59
60 check: packages test.img
61 G_SLICE=always-malloc ./proxinstall -t test.img
62
63 .phony: clean
64 clean:
65 make -C html-common clean
66 rm -rf *~ *.deb target build packages packages.tmp test.img pve-final.pkglist *.buildinfo *.changes country.dat
67 find . -name '*~' -exec rm {} ';'