]> git.proxmox.com Git - pve-installer.git/blob - Makefile
3a8bbd3c2ae1ab0c128db199f1b6c5cbcef083f8
[pve-installer.git] / Makefile
1 # achtung: also set release in proxinstall!
2 RELEASE=3.1
3
4 DEB=pve-installer_3.1-1_all.deb
5
6 INSTALLER_SOURCES= \
7 unconfigured.sh \
8 xorg.conf.fbdev \
9 fake-start-stop-daemon \
10 policy-disable-rc.d \
11 interfaces \
12 proxlogo.xpm \
13 checktime \
14 proxinstall
15
16 HTML_SOURCES=$(wildcard html/*.htm) $(wildcard html/*.css) $(wildcard html/*.png)
17
18 ${DEB}: ${INSTALLER_SOURCES} ${HTML_SOURCES} Makefile html/Makefile
19 rm -rf debian
20 mkdir debian
21 make DESTDIR=`pwd`/debian install
22 mkdir debian/DEBIAN
23 install -m 0644 control debian/DEBIAN
24 install -m 0644 conffiles debian/DEBIAN
25 dpkg-deb --build debian ${DEB}
26 rm -rf debian
27 lintian -X man ${DEB}
28
29 .phony: install
30 install: ${INSTALLER_SOURCES} ${HTML_SOURCES}
31 make DESTDIR=`pwd`/debian -C html install
32 install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
33 mkdir -p ${DESTDIR}/var/lib/dhcp3/
34 ln -s /tmp/dhclient.eth0.leases ${DESTDIR}/var/lib/dhcp3
35 ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf
36 ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf.dhclient-new
37 install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon
38 install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d
39 install -D -m 644 proxlogo.xpm ${DESTDIR}/var/lib/pve-installer/proxlogo.xpm
40 install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh
41 install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall
42 install -D -m 755 checktime ${DESTDIR}/usr/bin/checktime
43 install -D -m 644 xinitrc ${DESTDIR}/.xinitrc
44 install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults
45 install -D -m 644 xorg.conf.fbdev ${DESTDIR}/etc/X11/xorg.conf
46 install -D -m 644 copyright ${DESTDIR}/usr/share/doc/pve-installer/copyright
47 install -D -m 644 changelog.Debian ${DESTDIR}/usr/share/doc/pve-installer/changelog.Debian
48 gzip --best ${DESTDIR}/usr/share/doc/pve-installer/changelog.Debian
49
50 .phony: upload
51 upload: ${DEB}
52 umount /pve/${RELEASE}; mount -o rw /pve/${RELEASE}
53 mkdir -p /pve/${RELEASE}/extra
54 rm -rf /pve/${RELEASE}/extra/pve-installer_*.deb
55 rm -f /pve/${RELEASE}/extra/Packages*
56 cp ${DEB} /pve/${RELEASE}/extra
57 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
58 umount /pve/${RELEASE}; mount -o ro /pve/${RELEASE}
59
60 packages: /pve/${RELEASE}/install/pve.files
61 rm -rf packages packages.tmp; mkdir packages.tmp
62 for i in `cat $<`; do install -m 644 $$i packages.tmp/; done
63 mv packages.tmp packages
64
65 test.img:
66 dd if=/dev/zero of=test.img bs=1024 count=800000
67
68 check: packages test.img
69 G_SLICE=always-malloc ./proxinstall -t test.img
70
71 .phony: clean
72 clean:
73 make -C html clean
74 rm -rf *~ ${DEB} target debian packages packages.tmp test.img pve-final.pkglist