From: Iceyer Date: Mon, 15 Jan 2018 08:31:44 +0000 (+0800) Subject: feat: set verion when build X-Git-Tag: archive/raspbian/5.7.12-2+rpi1^2~130^2~26 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9083dbd3e29bf9d06b1032901ba13848fa964f4c;p=dtkcore.git feat: set verion when build Change-Id: Ic598a1b0b3eb5f10df07ea6e07a902a13ad6247c --- diff --git a/debian/rules b/debian/rules index 443c404..7119d0f 100755 --- a/debian/rules +++ b/debian/rules @@ -2,12 +2,15 @@ DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk export QT_SELECT = qt5 + +VERSION ?= $(shell if [ ! -f .git/config ];then dpkg-parsechangelog -ldebian/changelog -SVersion | awk -F'-' '{print $$1}'; fi) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + %: dh $@ --parallel override_dh_auto_configure: - dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) + dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) VERSION=$(VERSION) override_dh_auto_test: echo "skip auto test"