]> git.proxmox.com Git - pve-manager.git/commitdiff
build: pull REPOID into top-level Makefile
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 17 Oct 2018 11:02:02 +0000 (13:02 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 Oct 2018 12:17:08 +0000 (14:17 +0200)
otherwise it is missing when building in a clean chroot via a generated
source packages.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Makefile
PVE/Makefile
debian/rules

index f6e2d288ca45bd0bd77f178c87c9eeed37e093b3..8d462915e3db552dd162b670d6d499751a15cd56 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,9 @@ SUBDIRS = aplinfo PVE bin www services configs network-hooks test
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell git rev-parse HEAD)
 
+# possibly set via debian/rules(.env)
+REPOID?=$(shell git rev-parse --short=8 HEAD)
+
 DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
 
 all: ${SUBDIRS}
@@ -28,6 +31,7 @@ $(DEB):
        mkdir dest
        rsync -a * dest
        echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" >  dest/debian/SOURCE
+       echo "REPOID_GENERATED=${REPOID}" > dest/debian/rules.env
        cd dest; dpkg-buildpackage -b -us -uc
        # supress lintian error: statically-linked-binary usr/bin/pvemailforward
        lintian -X binaries ${DEB}
index ad46045836d1280329349809bd7b6c8bd855fa54..33e62f493ff40b1c26d6c787871564506b0400a0 100644 (file)
@@ -17,8 +17,6 @@ PERLSOURCE =                  \
 all: pvecfg.pm ${SUBDIRS}
        set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
 
-REPOID=$(shell git rev-parse --short=8 HEAD)
-
 pvecfg.pm: pvecfg.pm.in
        sed -e s/@VERSION@/${VERSION}/ -e s/@PACKAGERELEASE@/${PACKAGERELEASE}/ -e s/@PACKAGE@/${PACKAGE}/ -e s/@REPOID@/${REPOID}/ $< >$@.tmp
        mv $@.tmp $@
index 048483aaa95f09e85146e37e64513fc0fa6741b9..bafb3b125ebe9be91eb6aa2103df87333435cde0 100755 (executable)
@@ -1,5 +1,9 @@
 #!/usr/bin/make -f
 
+include debian/rules.env
+
+export REPOID=${REPOID_GENERATED}
+
 override_dh_compress:
        dh_compress -Xaplinfo.dat