2019-05-22 21:15:47 +02:00
i n c l u d e / u s r / s h a r e / d p k g / p k g - i n f o . m k
i n c l u d e / u s r / s h a r e / d p k g / a r c h i t e c t u r e . m k
2011-08-23 16:11:04 +02:00
i n c l u d e d e f i n e s . m k
2023-05-29 14:11:36 +02:00
export PVERELEASE = $( DEB_VERSION_UPSTREAM)
export VERSION = $( DEB_VERSION_UPSTREAM_REVISION)
2017-06-09 09:55:24 +02:00
2011-08-23 16:11:04 +02:00
DESTDIR =
2018-06-20 12:47:03 +02:00
SUBDIRS = aplinfo PVE bin www services configs network-hooks test
2011-08-23 16:11:04 +02:00
2023-05-29 14:44:24 +02:00
GITVERSION := $( shell git rev-parse --short= 16 HEAD)
2018-10-17 13:02:02 +02:00
2023-05-29 15:05:25 +02:00
DEB = $( PACKAGE) _$( VERSION) _$( DEB_HOST_ARCH) .deb
2011-08-23 16:11:04 +02:00
2023-05-29 14:11:36 +02:00
all : $( SUBDIRS )
set -e && for i in $( SUBDIRS) ; do $( MAKE) -C $$ i; done
2011-08-23 16:11:04 +02:00
2018-10-17 13:02:05 +02:00
.PHONY : check
2021-05-19 16:56:50 +02:00
check : bin test www
2023-05-29 14:11:36 +02:00
$( MAKE) -C bin check
$( MAKE) -C test check
$( MAKE) -C www check
2012-12-28 12:50:13 +01:00
2011-08-23 16:11:04 +02:00
.PHONY : dinstall
2023-05-29 14:11:36 +02:00
dinstall : $( DEB )
dpkg -i $( DEB)
2011-08-23 16:11:04 +02:00
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
2023-05-29 14:11:36 +02:00
echo " git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout $( GITVERSION) " > dest/debian/SOURCE
2023-05-29 14:44:24 +02:00
echo " REPOID_GENERATED= $( GITVERSION) " > dest/debian/rules.env
2017-06-12 09:27:23 +02:00
cd dest; dpkg-buildpackage -b -us -uc
2023-05-29 14:11:36 +02:00
lintian $( DEB)
2011-08-23 16:11:04 +02:00
.PHONY : upload
2023-05-29 14:11:36 +02: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
2023-05-29 14:11:36 +02:00
tar cf - $( DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
2011-08-23 16:11:04 +02:00
.PHONY : install
2018-06-20 12:47:02 +02:00
install : vzdump -hook -script .pl
2023-05-29 14:11:36 +02:00
install -d -m 0700 -o www-data -g www-data $( DESTDIR) /var/log/pveproxy
install -d $( DOCDIR) /examples
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 -m 0644 vzdump-hook-script.pl $( DOCDIR) /examples/vzdump-hook-script.pl
install -m 0644 spice-example-sh $( DOCDIR) /examples/spice-example-sh
set -e && for i in $( SUBDIRS) ; do $( MAKE) -C $$ i $@ ; done
2011-08-23 16:11:04 +02:00
.PHONY : distclean
distclean : clean
.PHONY : clean
clean :
2023-05-29 14:11:36 +02:00
set -e && for i in $( SUBDIRS) ; do $( MAKE) -C $$ i $@ ; done
2017-06-12 10:20:12 +02:00
rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp