2011-08-23 18:11:04 +04:00
i n c l u d e d e f i n e s . m k
2017-06-09 10:55:28 +03:00
export SOURCE_DATE_EPOCH ?= $( shell dpkg-parsechangelog -STimestamp)
2017-06-09 10:55:24 +03:00
2011-08-23 18:11:04 +04:00
DESTDIR =
2018-01-23 12:55:18 +03:00
SUBDIRS = aplinfo PVE bin www
2011-08-23 18:11:04 +04:00
2013-03-25 15:39:40 +04:00
ARCH := $( shell dpkg-architecture -qDEB_BUILD_ARCH)
2018-03-13 12:46:41 +03:00
GITVERSION := $( shell git rev-parse HEAD)
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
.PHONY : dinstall
dinstall : ${DEB }
dpkg -i ${ DEB }
country.dat : country .pl
./country.pl > country.dat
2017-02-07 17:38:33 +03:00
.PHONY : deb
deb : $( DEB )
$(DEB) :
2011-08-23 18:11:04 +04:00
rm -rf dest
mkdir dest
2017-06-09 10:55:28 +03:00
rsync -a * dest
echo " git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${ GITVERSION } " > dest/debian/SOURCE
2017-06-12 10:27:23 +03:00
cd dest; dpkg-buildpackage -b -us -uc
2013-03-25 15:39:40 +04:00
# supress lintian error: statically-linked-binary usr/bin/pvemailforward
2017-07-19 10:27:30 +03:00
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
2017-03-14 09:59:01 +03:00
tar cf - ${ DEB } | ssh -X repoman@repo.proxmox.com upload --product pve --dist stretch
2011-08-23 18:11:04 +04:00
.PHONY : install
2017-01-04 12:43:15 +03:00
install : country .dat vzdump .conf vzdump -hook -script .pl pve -apt .conf mtu bridgevlan bridgevlanport vlan vlan -down
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
2015-09-04 16:54:36 +03:00
install -D -m 0644 pve-blacklist.conf ${ DESTDIR } /etc/modprobe.d/pve-blacklist.conf
2011-10-31 09:57:13 +04:00
install -D -m 0644 vzdump.conf ${ DESTDIR } /etc/vzdump.conf
2013-12-31 12:40:01 +04:00
install -D -m 0755 mtu ${ DESTDIR } /etc/network/if-up.d/mtu
2015-07-29 05:42:42 +03:00
install -D -m 0755 bridgevlan ${ DESTDIR } /etc/network/if-up.d/bridgevlan
install -D -m 0755 bridgevlanport ${ DESTDIR } /etc/network/if-up.d/bridgevlanport
install -D -m 0755 vlan ${ DESTDIR } /etc/network/if-pre-up.d/vlan
install -D -m 0755 vlan-down ${ DESTDIR } /etc/network/if-post-down.d/vlan
2017-06-22 12:29:14 +03:00
install -D -m 0644 pve-initramfs.conf ${ DESTDIR } /etc/initramfs-tools/conf.d/pve-initramfs.conf
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-08-23 18:11:04 +04:00
install -m 0644 country.dat ${ DESTDIR } /usr/share/${ PACKAGE }
2017-06-09 10:55:28 +03:00
2011-08-23 18:11:04 +04: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 11:20:12 +03:00
rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp