2019-05-22 22:15:47 +03: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 18:11:04 +04:00
i n c l u d e d e f i n e s . m k
pvecfg: adapt version and release semantic
Wit commit a74ba607d4b02c5734c5480de62700f52f96ac71 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.
But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.
This patch does that, and also cleans up semantics a bit, the
following two changed:
release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1
This allows to do everything we used this information for even in a
slightly easier way (no string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)
Remove some cruft as we touch things.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:58:16 +03:00
export PVERELEASE = ${ DEB_VERSION_UPSTREAM }
export VERSION = ${ DEB_VERSION_UPSTREAM_REVISION }
2017-06-09 10:55:24 +03:00
2011-08-23 18:11:04 +04:00
DESTDIR =
2018-06-20 13:47:03 +03:00
SUBDIRS = aplinfo PVE bin www services configs network-hooks test
2011-08-23 18:11:04 +04:00
2018-03-13 12:46:41 +03:00
GITVERSION := $( shell git rev-parse HEAD)
2013-03-25 15:39:40 +04:00
2018-10-17 14:02:02 +03:00
# possibly set via debian/rules(.env)
REPOID ?= $( shell git rev-parse --short= 8 HEAD)
pvecfg: adapt version and release semantic
Wit commit a74ba607d4b02c5734c5480de62700f52f96ac71 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.
But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.
This patch does that, and also cleans up semantics a bit, the
following two changed:
release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1
This allows to do everything we used this information for even in a
slightly easier way (no string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)
Remove some cruft as we touch things.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:58:16 +03:00
DEB = ${ PACKAGE } _${ VERSION } _${ DEB_BUILD_ARCH } .deb
2011-08-23 18:11:04 +04:00
all : ${SUBDIRS }
2018-10-17 14:02:01 +03:00
set -e && for i in ${ SUBDIRS } ; do ${ MAKE } -C $$ i; done
2011-08-23 18:11:04 +04:00
2018-10-17 14:02:05 +03:00
.PHONY : check
2021-05-19 17:56:50 +03:00
check : bin test www
2018-10-17 14:02:05 +03:00
${ MAKE } -C bin check
2018-06-20 13:47:03 +03:00
${ MAKE } -C test check
2021-05-19 17:56:50 +03:00
${ MAKE } -C www check
2012-12-28 15:50:13 +04:00
2011-08-23 18:11:04 +04:00
.PHONY : dinstall
dinstall : ${DEB }
dpkg -i ${ DEB }
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
2018-10-17 14:02:02 +03:00
echo " REPOID_GENERATED= ${ REPOID } " > dest/debian/rules.env
2017-06-12 10:27:23 +03:00
cd dest; dpkg-buildpackage -b -us -uc
2021-10-04 13:07:18 +03:00
lintian ${ DEB }
2011-08-23 18:11:04 +04:00
.PHONY : upload
2012-12-28 15:50:13 +04:00
upload : ${DEB } check
2018-06-20 13:46:59 +03:00
# check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged
2021-05-20 21:54:07 +03:00
tar cf - ${ DEB } | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
2011-08-23 18:11:04 +04:00
.PHONY : install
2018-06-20 13:47:02 +03:00
install : vzdump -hook -script .pl
2013-04-10 10:08:02 +04:00
install -d -m 0700 -o www-data -g www-data ${ DESTDIR } /var/log/pveproxy
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
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
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