Skip to content

Commit

Permalink
Adjust version string of script during package build-time
Browse files Browse the repository at this point in the history
  • Loading branch information
mika committed Jan 27, 2012
1 parent 24ef6ad commit 7be0c4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions debian/rules
Expand Up @@ -9,10 +9,15 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

VERSION:=$(shell dpkg-parsechangelog | awk '/Version: / { print $$2 }')


build: build-stamp

build-stamp:
dh_testdir
egrep -q "^VERSION=.*UNRELEASED" grml-hwinfo || \
(echo "Wrong version in grml-hwinfo" && exit 2)

touch build-stamp

Expand All @@ -21,12 +26,12 @@ clean:
dh_testroot
rm -f build-stamp

dh_clean
dh_clean

install: build
dh_testdir
dh_testroot
dh_clean -k
dh_clean -k
dh_installdirs

# Add here commands to install the package into debian/grml-hwinfo.
Expand All @@ -41,9 +46,10 @@ binary-arch: build install
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installchangelogs
dh_installdocs
dh_installman grml-hwinfo.1 sysdump.8
sed -i -e "s/^VERSION='\*\*\*UNRELEASED\*\*\*'/VERSION='$(VERSION)'/" $(CURDIR)/debian/grml-hwinfo/usr/bin/grml-hwinfo
dh_link
dh_strip
dh_compress
Expand Down
2 changes: 1 addition & 1 deletion grml-hwinfo
Expand Up @@ -14,7 +14,7 @@
UNAME="$(uname -r)"
PN="$(basename $0)"
[ -n "$WORKING_DIR" -a -d "$WORKING_DIR" ] || WORKING_DIR=$(pwd)
VERSION='0.4.1'
VERSION='***UNRELEASED***'

# data collection should not be affected by user locale
export LANG=C
Expand Down

0 comments on commit 7be0c4c

Please sign in to comment.