Update version in grml-live during Debian package build
authorChristian Hofstaedtler <ch@grml.org>
Thu, 15 Dec 2011 17:06:42 +0000 (18:06 +0100)
committerChristian Hofstaedtler <ch@grml.org>
Thu, 15 Dec 2011 17:06:42 +0000 (18:06 +0100)
debian/rules
grml-live

index 0d9a343..36516e3 100755 (executable)
@@ -16,7 +16,7 @@ build: build-stamp
 
 build-stamp:
        dh_testdir
-       grep -q "GRML_LIVE_VERSION=.${VERSION}" grml-live || \
+       egrep -q "GRML_LIVE_VERSION=.*UNRELEASED" grml-live || \
                        (echo "Wrong version in grml-live" && exit 2)
        cd docs && $(MAKE) && cd ../
        touch $@
@@ -46,6 +46,7 @@ grml-live: install
        dh_installdocs       -p$@ -P$(b)/$@
        dh_installchangelogs -p$@ -P$(b)/$@
        dh_install           -p$@ -P$(b)/$@
+       sed -i -e "s/GRML_LIVE_VERSION='\*\*\*UNRELEASED\*\*\*'/GRML_LIVE_VERSION='$(VERSION)'/" $(b)/$@/usr/sbin/grml-live
        dh_strip             -p$@ -P$(b)/$@
        dh_compress          -p$@ -P$(b)/$@
        mkdir -p $(b)/$(@)/usr/share/lintian/overrides/
index 3044fc3..528a5c4 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -23,8 +23,10 @@ fi
 # disable for now since it seems to cause some problems
 # set -e
 
+# The line following this line is patched by debian/rules.
+GRML_LIVE_VERSION='***UNRELEASED***'
+
 # global variables
-GRML_LIVE_VERSION='0.17.0+autobuild1323909002'
 PN="$(basename $0)"
 CMDLINE="$0 $@"
 ADDONS_LIST_FILE='/boot/isolinux/addons_list.cfg'