]> git.proxmox.com Git - pve-installer.git/blob - Makefile
Makefile: improve cleanup target
[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 proxinstall
14
15 HTML_SOURCES=$(wildcard html/*.htm) $(wildcard html/*.css) $(wildcard html/*.png)
16
17 deb: ${DEB}
18 ${DEB}: ${INSTALLER_SOURCES} ${HTML_SOURCES} Makefile html/Makefile
19 rsync -a * build
20 cd build; dpkg-buildpackage -b -us -uc
21 lintian -X man ${DEB}
22
23 .phony: install
24 install: ${INSTALLER_SOURCES} ${HTML_SOURCES}
25 make -C html install
26 install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
27 mkdir -p ${DESTDIR}/var/lib/dhcp3/
28 ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf
29 ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf.dhclient-new
30 install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon
31 install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d
32 install -D -m 644 proxlogo.png ${DESTDIR}/var/lib/pve-installer/proxlogo.png
33 install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh
34 install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall
35 install -D -m 755 checktime ${DESTDIR}/usr/bin/checktime
36 install -D -m 644 xinitrc ${DESTDIR}/.xinitrc
37 install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults
38
39 .phony: upload
40 upload: ${DEB}
41 tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch
42
43 packages: /pve/${RELEASE}/install/pve.files
44 rm -rf packages packages.tmp; mkdir packages.tmp
45 for i in `cat $<`; do install -m 644 $$i packages.tmp/; done
46 mv packages.tmp packages
47
48 test.img:
49 dd if=/dev/zero of=test.img bs=2048 count=1M
50
51 check: packages test.img
52 G_SLICE=always-malloc ./proxinstall -t test.img
53
54 .phony: clean
55 clean:
56 make -C html clean
57 rm -rf *~ *.deb target build packages packages.tmp test.img pve-final.pkglist *.buildinfo *.changes
58 find . -name '*~' -exec rm {} ';'