chiark / gitweb /
dpkg-parsechangelog is noisy when you make a syntax error, but we don't need that...
authorjoy <joy@313b444b-1b9f-4f58-a734-7bb04f332e8d>
Wed, 19 Feb 2003 10:50:30 +0000 (10:50 +0000)
committerjoy <joy@313b444b-1b9f-4f58-a734-7bb04f332e8d>
Wed, 19 Feb 2003 10:50:30 +0000 (10:50 +0000)
git-svn-id: svn://anonscm.debian.org/ddp/manuals/trunk/developers-reference@2164 313b444b-1b9f-4f58-a734-7bb04f332e8d

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')