2011-08-23 16:11:04 +02:00
i n c l u d e d e f i n e s . m k
2017-06-09 09:55:28 +02:00
export SOURCE_DATE_EPOCH ?= $( shell dpkg-parsechangelog -STimestamp)
2017-06-09 09:55:24 +02:00
2011-08-23 16:11:04 +02:00
DESTDIR =
2018-06-20 12:47:02 +02:00
SUBDIRS = aplinfo PVE bin www services configs network-hooks
2011-08-23 16:11:04 +02:00
2013-03-25 12:39:40 +01:00
ARCH := $( shell dpkg-architecture -qDEB_BUILD_ARCH)
2018-03-13 10:46:41 +01:00
GITVERSION := $( shell git rev-parse HEAD)
2013-03-25 12:39:40 +01:00
DEB = ${ PACKAGE } _${ VERSION } -${ PACKAGERELEASE } _${ ARCH } .deb
2011-08-23 16:11:04 +02:00
all : ${SUBDIRS }
2012-12-28 12:50:13 +01:00
check :
${ MAKE } -C bin/test check
2011-08-23 16:11:04 +02:00
.PHONY : dinstall
dinstall : ${DEB }
dpkg -i ${ DEB }
2017-02-07 15:38:33 +01:00
.PHONY : deb
deb : $( DEB )
$(DEB) :
2011-08-23 16:11:04 +02:00
rm -rf dest
mkdir dest
2017-06-09 09:55:28 +02:00
rsync -a * dest
echo " git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${ GITVERSION } " > dest/debian/SOURCE
2017-06-12 09:27:23 +02:00
cd dest; dpkg-buildpackage -b -us -uc
2013-03-25 12:39:40 +01:00
# supress lintian error: statically-linked-binary usr/bin/pvemailforward
2017-07-19 09:27:30 +02:00
lintian -X binaries ${ DEB }
2011-08-23 16:11:04 +02:00
.PHONY : upload
2012-12-28 12:50:13 +01:00
upload : ${DEB } check
2018-06-20 12:46:59 +02:00
# check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged
2017-03-14 07:59:01 +01:00
tar cf - ${ DEB } | ssh -X repoman@repo.proxmox.com upload --product pve --dist stretch
2011-08-23 16:11:04 +02:00
.PHONY : install
2018-06-20 12:47:02 +02:00
install : vzdump -hook -script .pl
2013-04-10 08:08:02 +02:00
install -d -m 0700 -o www-data -g www-data ${ DESTDIR } /var/log/pveproxy
2011-08-23 16:11:04 +02:00
install -d ${ DESTDIR } /usr/share/${ PACKAGE }
install -d ${ DESTDIR } /usr/share/man/man1
2011-10-31 07:10:59 +01:00
install -d ${ DOCDIR } /examples
2011-08-23 16:11:04 +02: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
2011-10-31 07:10:59 +01:00
install -m 0644 vzdump-hook-script.pl ${ DOCDIR } /examples/vzdump-hook-script.pl
2014-03-03 07:22:56 +01:00
install -m 0644 spice-example-sh ${ DOCDIR } /examples/spice-example-sh
2011-08-23 16:11:04 +02:00
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i $@ ; done
.PHONY : distclean
distclean : clean
.PHONY : clean
clean :
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i $@ ; done
find . -name '*~' -exec rm { } ';'
2017-06-12 10:20:12 +02:00
rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp