[Pkg-voip-commits] r6679 - /druid-pgsql/trunk/debian/rules

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Thu Jan 15 19:24:51 UTC 2009


Author: tzafrir-guest
Date: Thu Jan 15 19:24:50 2009
New Revision: 6679

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6679
Log:
A working, though yukish get-orig-source.

Upstream needs to figure out where the source is.

Modified:
    druid-pgsql/trunk/debian/rules

Modified: druid-pgsql/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/druid-pgsql/trunk/debian/rules?rev=6679&op=diff
==============================================================================
--- druid-pgsql/trunk/debian/rules (original)
+++ druid-pgsql/trunk/debian/rules Thu Jan 15 19:24:50 2009
@@ -13,6 +13,19 @@
 #export DH_COMPAT=5
 
 -include /usr/share/quilt/quilt.make
+
+PACKAGE:=$(shell sed -nre 's/^Source: (.*)$$/\1/p' debian/control)
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
+
+TARBALL:=$(PACKAGE)_$(UPVERSION).orig.tar.gz
+SRPM_BASE=http://yum.voiceroute.net/druidos/5/SRPMS
+SRPM=druid-pgsql-2.0.0-3.src.rpm
+SRPM_FULL=$(SRPM_BASE)/$(SRPM)
+
+TARBALL_DIR=../tarballs/$(PACKAGE)-$(UPVERSION).tmp
+SRPM_LOCAL=$(TARBALL_DIR)/$(SRPM)
 
 configure: configure-stamp
 configure-stamp: patch
@@ -67,5 +80,13 @@
 	dh_md5sums
 	dh_builddeb
 
+get-orig-source:
+	@dh_testdir
+	@[ -d $(TARBALL_DIR) ]||mkdir -p $(TARBALL_DIR)
+	wget -nv -T10 -t3 -O $(SRPM_LOCAL) $(SRPM_FULL)
+	@rpm2cpio $(SRPM_LOCAL) | (cd $(TARBALL_DIR); cpio -idu druid-pgsql.tar.gz )
+	@mv $(TARBALL_DIR)/druid-pgsql.tar.gz ../tarballs/$(TARBALL)
+	@rm -rf $(TARBALL_DIR)
+
 binary: binary-indep
 .PHONY: build clean binary-indep binary install configure patch unpatch




More information about the Pkg-voip-commits mailing list