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-01-23 10:55:18 +01:00
SUBDIRS = aplinfo PVE bin www
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 }
country.dat : country .pl
./country.pl > country.dat
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
2011-09-15 14:54:42 +02:00
./repoid.pl .git check
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
2017-01-04 10:43:15 +01:00
install : country .dat vzdump .conf vzdump -hook -script .pl pve -apt .conf mtu bridgevlan bridgevlanport vlan vlan -down
2013-04-10 08:08:02 +02: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 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
2013-07-25 07:53:07 +02:00
install -D -m 0644 pve-apt.conf ${ DESTDIR } /etc/apt/apt.conf.d/75pveconf
2013-08-01 09:23:03 +02:00
install -D -m 0644 pve-sources.list ${ DESTDIR } /etc/apt/sources.list.d/pve-enterprise.list
2015-09-04 15:54:36 +02:00
install -D -m 0644 pve-blacklist.conf ${ DESTDIR } /etc/modprobe.d/pve-blacklist.conf
2011-10-31 06:57:13 +01:00
install -D -m 0644 vzdump.conf ${ DESTDIR } /etc/vzdump.conf
2013-12-31 09:40:01 +01:00
install -D -m 0755 mtu ${ DESTDIR } /etc/network/if-up.d/mtu
2015-07-29 04:42:42 +02: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 11:29:14 +02:00
install -D -m 0644 pve-initramfs.conf ${ DESTDIR } /etc/initramfs-tools/conf.d/pve-initramfs.conf
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
install -m 0644 country.dat ${ DESTDIR } /usr/share/${ PACKAGE }
2017-06-09 09:55:28 +02:00
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