2011-08-23 18:11:04 +04:00
i n c l u d e d e f i n e s . m k
DESTDIR =
#SUBDIRS = bin lib www aplinfo
2011-11-18 16:54:23 +04:00
SUBDIRS = aplinfo PVE bin www po
2011-08-23 18:11:04 +04:00
2013-03-25 15:39:40 +04:00
ARCH := $( shell dpkg-architecture -qDEB_BUILD_ARCH)
2013-08-22 13:48:17 +04:00
GITVERSION := $( shell cat .git/refs/heads/master)
2013-03-25 15:39:40 +04:00
DEB = ${ PACKAGE } _${ VERSION } -${ PACKAGERELEASE } _${ ARCH } .deb
2011-08-23 18:11:04 +04:00
all : ${SUBDIRS }
2012-12-28 15:50:13 +04:00
check :
${ MAKE } -C bin/test check
2011-08-23 18:11:04 +04:00
% :
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i $@ ; done
2013-07-25 13:22:56 +04:00
pve-repo-ca-certificates.crt :
rm -rf ca-tmp
mkdir ca-tmp
cd ca-tmp; wget http://aia.startssl.com/certs/sub.class1.server.ca.pem
cd ca-tmp; wget http://aia.startssl.com/certs/ca.pem
cd ca-tmp; cat *.pem >../$@
2011-08-23 18:11:04 +04:00
.PHONY : dinstall
dinstall : ${DEB }
dpkg -i ${ DEB }
country.dat : country .pl
./country.pl > country.dat
.PHONY : ${DEB }
${DEB} deb :
make clean
rm -rf dest
mkdir dest
make DESTDIR = ` pwd ` /dest install
mkdir dest/DEBIAN
sed -e s/@VERSION@/${ VERSION } / -e s/@PACKAGE@/${ PACKAGE } / -e s/@PACKAGERELEASE@/${ PACKAGERELEASE } / debian/control.in >dest/DEBIAN/control
install -m 0644 debian/conffiles dest/DEBIAN
install -m 0755 debian/config dest/DEBIAN
install -m 0644 debian/templates dest/DEBIAN
install -m 0755 debian/postinst dest/DEBIAN
install -m 0755 debian/prerm dest/DEBIAN
install -m 0755 debian/postrm dest/DEBIAN
install -m 0644 debian/triggers dest/DEBIAN
2013-08-22 13:48:17 +04:00
echo " git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${ GITVERSION } " > dest/usr/share/doc/${ PACKAGE } /SOURCE
2011-08-23 18:11:04 +04:00
gzip --best dest/usr/share/man/*/*
gzip --best dest/usr/share/doc/${ PACKAGE } /changelog.Debian
dpkg-deb --build dest
mv dest.deb ${ DEB }
rm -rf dest
2013-03-25 15:39:40 +04:00
# supress lintian error: statically-linked-binary usr/bin/pvemailforward
lintian -X binaries ${ DEB }
2011-08-23 18:11:04 +04:00
.PHONY : upload
2012-12-28 15:50:13 +04:00
upload : ${DEB } check
2011-09-15 16:54:42 +04:00
./repoid.pl .git check
2011-08-23 18:11:04 +04:00
umount /pve/${ RELEASE } ; mount /pve/${ RELEASE } -o rw
mkdir -p /pve/${ RELEASE } /extra
rm -f /pve/${ RELEASE } /extra/${ PACKAGE } _*.deb
rm -f /pve/${ RELEASE } /extra/Packages*
cp ${ DEB } /pve/${ RELEASE } /extra
cd /pve/${ RELEASE } /extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
umount /pve/${ RELEASE } ; mount /pve/${ RELEASE } -o ro
#.PHONY: poupload
#poupload:
# rsync po/*.po po/pve-manager.pot pve.proxmox.com:/home/ftp/sources/po-files/
2012-10-23 11:17:43 +04:00
.PHONY : aplupload
aplupload :
./aplinfo/apltest.pl
gpg -bas -u support@proxmox.com aplinfo/aplinfo.dat
gzip -c aplinfo/aplinfo.dat > aplinfo.dat.gz
scp aplinfo/aplinfo.dat aplinfo.dat.gz aplinfo/aplinfo.dat.asc download1.proxmox.com:/home/ftp/appliances/
2011-08-23 18:11:04 +04:00
.PHONY : install
2013-12-31 12:40:01 +04:00
install : country .dat vznet .conf vzdump .conf vzdump -hook -script .pl pve -apt .conf pve -repo -ca -certificates .crt mtu
2013-04-10 10:08:02 +04:00
install -d -m 0700 -o www-data -g www-data ${ DESTDIR } /var/log/pveproxy
install -D -m 0644 debian/pve.logrotate ${ DESTDIR } /etc/logrotate.d/pve
2011-08-23 18:11:04 +04:00
install -d ${ DESTDIR } /usr/share/${ PACKAGE }
install -d ${ DESTDIR } /usr/share/man/man1
2011-10-31 10:10:59 +04:00
install -d ${ DOCDIR } /examples
2011-08-23 18:11:04 +04:00
install -d ${ DESTDIR } /var/lib/${ PACKAGE }
install -d ${ DESTDIR } /var/lib/vz/images
install -d ${ DESTDIR } /var/lib/vz/template/cache
install -d ${ DESTDIR } /var/lib/vz/template/iso
install -d ${ DESTDIR } /var/lib/vz/template/qemu
2013-07-25 09:53:07 +04:00
install -D -m 0644 pve-apt.conf ${ DESTDIR } /etc/apt/apt.conf.d/75pveconf
2013-08-01 11:23:03 +04:00
install -D -m 0644 pve-sources.list ${ DESTDIR } /etc/apt/sources.list.d/pve-enterprise.list
2013-07-25 13:22:56 +04:00
install -D -m 0644 pve-repo-ca-certificates.crt ${ DESTDIR } /etc/apt/pve-repo-ca-certificates.crt
2011-10-31 09:57:13 +04:00
install -D -m 0644 vzdump.conf ${ DESTDIR } /etc/vzdump.conf
2011-08-23 18:11:04 +04:00
install -D -m 0755 vznet.conf ${ DESTDIR } /etc/vz/vznet.conf
2013-12-31 12:40:01 +04:00
install -D -m 0755 mtu ${ DESTDIR } /etc/network/if-up.d/mtu
2011-10-31 10:10:59 +04:00
install -m 0644 vzdump-hook-script.pl ${ DOCDIR } /examples/vzdump-hook-script.pl
2014-03-03 10:22:56 +04:00
install -m 0644 spice-example-sh ${ DOCDIR } /examples/spice-example-sh
2011-10-31 10:10:59 +04:00
install -m 0644 copyright ${ DOCDIR }
install -m 0644 debian/changelog.Debian ${ DOCDIR }
2011-08-23 18:11:04 +04:00
install -m 0644 country.dat ${ DESTDIR } /usr/share/${ PACKAGE }
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i $@ ; done
.PHONY : distclean
distclean : clean
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i $@ ; done
.PHONY : clean
clean :
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i $@ ; done
find . -name '*~' -exec rm { } ';'
2013-07-25 13:22:56 +04:00
rm -rf dest country.dat *.deb ca-tmp