X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=debian%2Frules;h=0ba34864f5b10a80b68aced6d5e38eec001f2253;hp=3b6a2d0d53853e35cc79fda697cdb21f4b9bc5ed;hb=5e37e246dbaa0b5844ee0a5360a18afae5c800ed;hpb=0b7e7606d03618626d51e31652521307c8267720 diff --git a/debian/rules b/debian/rules index 3b6a2d0..0ba3486 100755 --- a/debian/rules +++ b/debian/rules @@ -9,12 +9,18 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -build: build-stamp +VERSION:=$(shell dpkg-parsechangelog | awk '/Version: / { print $$2 }') + +build: build-arch build-indep +build-arch: build-stamp +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 clean: @@ -23,29 +29,31 @@ clean: rm -f build-stamp # Add here commands to clean up after the build process. - dh_clean + $(MAKE) clean + cd mbr && $(MAKE) clean && cd .. + dh_clean install: build dh_testdir dh_testroot - dh_clean -k - dh_installdirs + dh_prep + dh_installdirs usr/share/grml2usb/grub usr/share/grml2usb/mbr # Add here commands to install the package into debian/grml2usb. - install -m 755 grml2usb debian/grml2usb/usr/sbin/ - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. + 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 + cp -a grub/ debian/grml2usb/usr/share/grml2usb/ # Build architecture-dependent files here. -binary-arch: build install +binary-arch: build-arch install dh_testdir dh_testroot - dh_installchangelogs - dh_installdocs - dh_installman grml2usb.8 - dh_link + dh_installchangelogs + dh_installdocs TODO + dh_installman grml2usb.8 grml2iso.8 dh_strip dh_compress dh_fixperms @@ -55,5 +63,9 @@ binary-arch: build 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