X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=b3284c63dc4858a997cd9a8dcb01ec886b471b6d;hb=754abb4437f8b6a1b5a4cb17ce1bf0d2d539615d;hp=44feb7d94026326cdaf358495f7d70a45ad13f32;hpb=64c46db32f5db57b950b4e06a2e04eb10b51fdf0;p=pve-installer.git diff --git a/Makefile b/Makefile index 44feb7d..b3284c6 100644 --- a/Makefile +++ b/Makefile @@ -1,65 +1,84 @@ -# achtung: also set release in proxinstall! -RELEASE=5.0 +PKGVER=5.0 +PKGREL=23 -DEB=pve-installer_5.0-1_all.deb +PVE_DEB=pve-installer_${PKGVER}-${PKGREL}_all.deb +PMG_DEB=pmg-installer_${PKGVER}-${PKGREL}_all.deb + +DEBS = ${PVE_DEB} ${PMG_DEB} INSTALLER_SOURCES= \ unconfigured.sh \ fake-start-stop-daemon \ policy-disable-rc.d \ interfaces \ - proxlogo.png \ + pmg-banner.png \ + pve-banner.png \ checktime \ + xinitrc \ + Xdefaults \ + country.dat \ proxinstall -HTML_SOURCES=$(wildcard html/*.htm) $(wildcard html/*.css) $(wildcard html/*.png) +HTML_SOURCES=$(wildcard html/*.htm) +HTML_COMMON_SOURCES=$(wildcard html-common/*.htm) $(wildcard html-common/*.css) $(wildcard html-common/*.png) + +all: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES} + +country.dat: country.pl + ./country.pl > country.dat -${DEB}: ${INSTALLER_SOURCES} ${HTML_SOURCES} Makefile html/Makefile - rm -rf debian - mkdir debian - make DESTDIR=`pwd`/debian install - mkdir debian/DEBIAN - install -m 0644 control debian/DEBIAN - install -m 0644 conffiles debian/DEBIAN - fakeroot dpkg-deb --build debian ${DEB} - rm -rf debian - lintian -X man ${DEB} +deb: ${DEBS} +${DEBS}: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES} + rsync -a * build + cd build; dpkg-buildpackage -b -us -uc + lintian -X man ${PVE_DEB} + lintian -X man ${PMG_DEB} .phony: install -install: ${INSTALLER_SOURCES} ${HTML_SOURCES} - make DESTDIR=`pwd`/debian -C html install +install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES} + make -C html-common install install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces mkdir -p ${DESTDIR}/var/lib/dhcp3/ ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf ln -s /tmp/resolv.conf.dhclient-new ${DESTDIR}/etc/resolv.conf.dhclient-new install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d - install -D -m 644 proxlogo.png ${DESTDIR}/var/lib/pve-installer/proxlogo.png + install -D -m 644 country.dat ${DESTDIR}/var/lib/pve-installer/country.dat install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall install -D -m 755 checktime ${DESTDIR}/usr/bin/checktime install -D -m 644 xinitrc ${DESTDIR}/.xinitrc install -D -m 644 Xdefaults ${DESTDIR}/.Xdefaults - install -D -m 644 copyright ${DESTDIR}/usr/share/doc/pve-installer/copyright - install -D -m 644 changelog.Debian ${DESTDIR}/usr/share/doc/pve-installer/changelog.Debian - gzip -n --best ${DESTDIR}/usr/share/doc/pve-installer/changelog.Debian -.phony: upload -upload: ${DEB} - tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch +pmg-banner.png: pmg-banner.svg + rsvg-convert -o $@ $< -packages: /pve/${RELEASE}/install/pve.files - rm -rf packages packages.tmp; mkdir packages.tmp - for i in `cat $<`; do install -m 644 $$i packages.tmp/; done - mv packages.tmp packages +pve-banner.png: pve-banner.svg + rsvg-convert -o $@ $< + +.phony: upload-pmg +upload-pmg: ${PMG_DEB} + tar cf - ${PMG_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch + +.phony: upload-pve +upload-pve: ${PVE_DEB} + tar cf - ${PVE_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch test.img: - dd if=/dev/zero of=test.img bs=2048 count=1M + truncate -s 2G test.img + +check-pve: ${PVE_DEB} test.img + rm -rf testdir + dpkg -X ${PVE_DEB} testdir + G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img -check: packages test.img - G_SLICE=always-malloc ./proxinstall -t test.img +check-pmg: ${PMG_DEB} test.img + rm -rf testdir + dpkg -X ${PMG_DEB} testdir + G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img .phony: clean clean: - make -C html clean - rm -rf *~ ${DEB} target debian packages packages.tmp test.img pve-final.pkglist + make -C html-common clean + rm -rf *~ *.deb target build packages packages.tmp testdir test.img pve-final.pkglist *.buildinfo *.changes country.dat final.pkglist + find . -name '*~' -exec rm {} ';'