buildsys: only get git revision if actually used

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-26 09:22:30 +02:00
parent 15beb08b8d
commit 1f11c55787

View File

@ -2,8 +2,6 @@ include /usr/share/dpkg/pkg-info.mk
PACKAGE=proxmox-mailgateway
GITVERSION:=$(shell git rev-parse HEAD)
BUILDDIR=$(PACKAGE)-$(DEB_VERSION)
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
@ -22,7 +20,7 @@ $(BUILDDIR): debian
rm -rf $@ $@.tmp
mkdir -p $@.tmp/debian
cp -a debian/ $@.tmp/
echo "git clone git://git.proxmox.com/git/proxmox-mailgateway.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
echo "git clone git://git.proxmox.com/git/proxmox-mailgateway.git\\ngit checkout $(shell git rev-parse HEAD)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
$(DEB): $(BUILDDIR)