[med-svn] r11557 - trunk/packages/seg/trunk/debian
Andreas Tille
tille at alioth.debian.org
Thu Jul 5 07:10:59 UTC 2012
Author: tille
Date: 2012-07-05 07:10:58 +0000 (Thu, 05 Jul 2012)
New Revision: 11557
Modified:
trunk/packages/seg/trunk/debian/rules
Log:
Obtain package name and version from debian/changelog to make packaging more flexible and not duplicate any data if not needed
Modified: trunk/packages/seg/trunk/debian/rules
===================================================================
--- trunk/packages/seg/trunk/debian/rules 2012-07-05 06:01:38 UTC (rev 11556)
+++ trunk/packages/seg/trunk/debian/rules 2012-07-05 07:10:58 UTC (rev 11557)
@@ -6,13 +6,15 @@
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+ver := $(shell dpkg-parsechangelog | awk '/^Version/ { print $2 }' | cut -d- -f1 )
+pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+
.PHONY: get-orig-source
get-orig-source:
set -e; \
- v="1994101801"; \
t=$$(mktemp -d) || exit 1; \
trap "rm -rf -- '$$t'" EXIT; \
- d="$$t/seg-$${v}.orig"; \
+ d="$$t/$(pkg)-$(ver).orig"; \
mkdir "$$d"; \
( cd "$$d"; \
wget \
@@ -25,7 +27,7 @@
ftp://ftp.ncbi.nih.gov/pub/seg/seg/seg.c\
ftp://ftp.ncbi.nih.gov/pub/seg/seg/seg.doc; \
); \
- GZIP=--best tar -czf "./seg_$${v}.orig.tar.gz" -C "$$t" "seg-$${v}.orig"
+ GZIP=--best tar -czf "./$(pkg)_$(ver).orig.tar.gz" -C "$$t" "$(pkg)-$(ver).orig"
.PHONY: override_dh_autoreconf
override_dh_autoreconf:
@@ -33,7 +35,7 @@
.PHONY: override_dh_strip
override_dh_strip:
- dh_strip --dbg-package=seg-dbg
+ dh_strip --dbg-package=$(pkg)-dbg
%:
dh $@ --with autoreconf
More information about the debian-med-commit
mailing list