r20672 - in /tools/gnome-pkg-tools: 1/rules/lp-get-source.mk debian/changelog

pochu-guest at users.alioth.debian.org pochu-guest at users.alioth.debian.org
Sat Jul 11 15:08:25 UTC 2009


Author: pochu-guest
Date: Sat Jul 11 15:08:23 2009
New Revision: 20672

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=20672
Log:
1/rules/lp-get-source.mk: New rule to fetch orig tarballs from Launchpad.

Added:
    tools/gnome-pkg-tools/1/rules/lp-get-source.mk
Modified:
    tools/gnome-pkg-tools/debian/changelog

Added: tools/gnome-pkg-tools/1/rules/lp-get-source.mk
URL: http://svn.debian.org/wsvn/pkg-gnome/tools/gnome-pkg-tools/1/rules/lp-get-source.mk?rev=20672&op=file
==============================================================================
--- tools/gnome-pkg-tools/1/rules/lp-get-source.mk (added)
+++ tools/gnome-pkg-tools/1/rules/lp-get-source.mk Sat Jul 11 15:08:23 2009
@@ -1,0 +1,24 @@
+# copied from CDBS' buildvars
+DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
+DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
+DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-)
+DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
+
+# where to store the resulting .orig tarball
+DEB_TARBALL_DOWNLOAD_DIR ?= ../tarballs
+
+LP_DOWNLOAD_PAGE ?= https://launchpad.net/$(DEB_SOURCE_PACKAGE)/+download
+LP_DOWNLOAD_URL ?= $(shell wget -q -O - $(LP_DOWNLOAD_PAGE) | grep -o 'href="http://launchpad.net/$(DEB_SOURCE_PACKAGE)/.*/+download/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)\.tar\.gz"' | cut -d'"' -f2)
+
+LP_DOWNLOAD_COMMAND ?= wget -nv -T15 -t1 -O $(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(LP_DOWNLOAD_URL)
+
+get-orig-source:
+	dh_testdir
+	@@echo 'Source package:                      $(DEB_SOURCE_PACKAGE)'
+	@@echo 'Upstream version:                    $(DEB_UPSTREAM_VERSION)'
+	@@echo 'Download page:                       $(LP_DOWNLOAD_PAGE)'
+	@@echo 'Download url:                        $(LP_DOWNLOAD_URL)'
+	mkdir -p $(DEB_TARBALL_DOWNLOAD_DIR)
+	$(LP_DOWNLOAD_COMMAND)
+
+.PHONY: get-orig-source

Modified: tools/gnome-pkg-tools/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/tools/gnome-pkg-tools/debian/changelog?rev=20672&op=diff
==============================================================================
--- tools/gnome-pkg-tools/debian/changelog (original)
+++ tools/gnome-pkg-tools/debian/changelog Sat Jul 11 15:08:23 2009
@@ -1,3 +1,9 @@
+gnome-pkg-tools (0.14.3) UNRELEASED; urgency=low
+
+  * 1/rules/lp-get-source.mk: New rule to fetch orig tarballs from Launchpad.
+
+ -- Emilio Pozuelo Monfort <pochu at ubuntu.com>  Sat, 11 Jul 2009 17:05:30 +0200
+
 gnome-pkg-tools (0.14.2) unstable; urgency=low
 
   [ Josselin Mouette ]




More information about the pkg-gnome-commits mailing list