X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=debian%2Frules;h=0ba34864f5b10a80b68aced6d5e38eec001f2253;hp=c3e0d946bf2a0f35ea8894b53734c90e9960f477;hb=2b2c97afc1aae8c4a38c31921b21638d27638240;hpb=154f7d7f07aedc6f9bedec6bb2581523934509c7 diff --git a/debian/rules b/debian/rules index c3e0d94..0ba3486 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 = '\*\*\*UNRELEASED\*\*\*'" 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 = '\*\*\*UNRELEASED\*\*\*'/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 @@ -64,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