chiark / gitweb /
- Updated PTS documentation.
[developers-reference.git] / debian / rules
index 929066550142de232539ce2dbbf9ae350cdf0d8f..53b78a51d8f248351fcc8901b7f9885d5954b7a8 100755 (executable)
@@ -20,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')