diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-11-08 15:25:47 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-11-08 16:48:01 +0100 |
commit | 4d9b8f81b4331dea1f8186e1245a1210be3bf767 (patch) | |
tree | 9742916c5c703d91b7cf101f91a29d89bbcebf79 /conf.d/packaging/deb | |
parent | 27a69eaacb5efd2bc81e839d20828899ef70b7a7 (diff) |
Packaging: Set project version using command-line
When packaging, the build environment doesn't clone the git repository but instead
use an archive and so we lose the git repository's information. This is a workaround
to set the project version using the packaging system.
Change-Id: I3e8edc197a12f455f4f1cc24bc452feb146bab6c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/packaging/deb')
-rw-r--r-- | conf.d/packaging/deb/debian.rules | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/conf.d/packaging/deb/debian.rules b/conf.d/packaging/deb/debian.rules index 4637103..8209cd9 100644 --- a/conf.d/packaging/deb/debian.rules +++ b/conf.d/packaging/deb/debian.rules @@ -2,13 +2,14 @@ # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +export VERSION=$(shell grep -E "^Version" ../*dsc | sed -r 's/^.*: (.*)-.*/\1/') %: bash /etc/profile.d/AGL-app-framework-binder.sh dh $@ override_dh_auto_configure: - dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/opt/AGL -DCMAKE_INSTALL_LIBDIR:PATH=lib/${DEB_HOST_MULTIARCH} + dh_auto_configure -- -DVERSION=${VERSION} -DCMAKE_INSTALL_PREFIX=/opt/AGL -DCMAKE_INSTALL_LIBDIR:PATH=lib/${DEB_HOST_MULTIARCH} override_dh_auto_install: dh_auto_install --destdir=/usr/src/packages/BUILD/debian/tmp |