X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=debian%2Frules;h=53b78a51d8f248351fcc8901b7f9885d5954b7a8;hb=e0c979b14c5e1aa9cb221b068cecdf0daed7d063;hp=5350ddc4c640eb40d12d7bc18c8d34c93c1b07d5;hpb=2bdbe98fd314ef41fc610a01ec85ccd299eca629;p=developers-reference.git diff --git a/debian/rules b/debian/rules index 5350ddc..53b78a5 100755 --- a/debian/rules +++ b/debian/rules @@ -1,9 +1,5 @@ #!/usr/bin/make -f # rules file for developers-reference -# -# I do not use debstd, debhelper, or any of that stuff. -# I believe in stripped down rules files; nothing that is not required -# I believe in readability through abstraction package := developers-reference @@ -24,8 +20,8 @@ make_directory := install -d -o root -g root -m 755 compress := gzip -9f # version abstraction -DEB_VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: *//') -DEB_DATE := $(shell dpkg-parsechangelog | sed -n 's/^Date: *//p') +DEB_VERSION := $(shell awk -F '[()]' '/^$(package)/{ print $$2; exit }' debian/changelog) +DEB_DATE := $(shell dpkg-parsechangelog 2>/dev/null | sed -n 's/^Date: *//p') # pretty-print the date; I wish this was dynamic like the top-level makefile but oh well DATE_EN := $(shell LC_ALL=C date --date="$(DEB_DATE)" '+%d %B, %Y') DATE_FR := $(shell LC_ALL=fr_FR date --date="$(DEB_DATE)" '+%d %B %Y') @@ -83,10 +79,7 @@ binary-indep: test install dh_installchangelogs -i dh_compress -i dh_fixperms -i -# debian/tocsubstvars -# be tricky about putting the TOC sections into the description of the package -# perl -ne '/^\d+\.\s/ && print " $$_";' < developers-reference.txt \ -# >> $(prefix)/DEBIAN/control + debian/tocsubstvars -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i