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