X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=debian%2Frules;h=f8d5cedff6d448e394384947bcb1cfbd0b89300b;hp=3a35d9e7d571a02efa1f8afba53e91539da573b9;hb=4d800e56b2e2de9cdf1d133fd4ce6680c4918a33;hpb=ecfce70d14fc85005ec6dcd4a82650810ea89b1a diff --git a/debian/rules b/debian/rules index 3a35d9e..f8d5ced 100755 --- a/debian/rules +++ b/debian/rules @@ -9,6 +9,8 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +VERSION:=$(shell dpkg-parsechangelog | awk '/Version: / { print $$2 }') + build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp @@ -16,7 +18,7 @@ build-indep: build-stamp build-stamp: dh_testdir - # Add here commands to compile the package. + egrep -q "^PROG_VERSION = '\*\*\*UNKNOWN\*\*\*'" grml2usb || (echo "PROG_VERSION in grml2usb wrong." && exit 2) $(MAKE) cd mbr && $(MAKE) && cd .. touch build-stamp @@ -39,6 +41,7 @@ install: build # Add here commands to install the package into debian/grml2usb. install -m 755 grml2usb debian/grml2usb/usr/sbin/grml2usb + sed -i -e "s/^PROG_VERSION = '\*\*\*UNKNOWN\*\*\*'/PROG_VERSION = '$(VERSION)'/" debian/grml2usb/usr/sbin/grml2usb install -m 755 grml2iso debian/grml2usb/usr/sbin/grml2iso install -m 644 mbr/mbrmgr debian/grml2usb/usr/share/grml2usb/mbr/mbrmgr install -m 644 mbr/mbrldr debian/grml2usb/usr/share/grml2usb/mbr/mbrldr @@ -46,10 +49,6 @@ install: build # Build architecture-dependent files here. binary-arch: build-arch install -# We have nothing to do by default. - -# Build architecture-independent files here. -binary-indep: build-indep install dh_testdir dh_testroot dh_installchangelogs @@ -57,8 +56,6 @@ binary-indep: build-indep install dh_installman grml2usb.8 grml2iso.8 dh_strip dh_compress - mkdir -p debian/grml2usb/usr/share/lintian/overrides/ - cp -av debian/overrides debian/grml2usb/usr/share/lintian/overrides/grml2usb dh_fixperms dh_installdeb dh_shlibdeps @@ -66,5 +63,9 @@ binary-indep: build-indep install dh_md5sums dh_builddeb +# Build architecture-independent files here. +binary-indep: build-indep install +# Nothing to do. + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install