[Pkg-cli-libs-commits] [newtonsoft-json] 02/14: Rewrite get-orig-source rule

Jo Shields directhex at moszumanska.debian.org
Mon Dec 14 14:43:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

directhex pushed a commit to annotated tag debian/6.0.8+dfsg-1
in repository newtonsoft-json.

commit 72b748b91ae89c3b693e7a730ef45f9b4e2b5ecf
Author: Jo Shields <jo.shields at xamarin.com>
Date:   Mon Dec 14 13:12:49 2015 +0000

    Rewrite get-orig-source rule
---
 debian/rules | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/debian/rules b/debian/rules
index ce9e57b..ecd0f56 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,22 +3,15 @@
 
 include /usr/share/dpkg/default.mk
 
-UPSTREAM_URL = http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=json&DownloadId=690219&FileTime=130149616152700000&Build=20602
-UNPACK_DIR = $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)
-ZIPFILE = $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).zip
-TARFILE = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
-
+upstream_version=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-\+]+)+(\+dfsg)*.*,\1,p')
 get-orig-source:
-	! [ -e '$(ZIPFILE)' ] && ! [ -e '$(TARFILE)' ]
-	wget '$(UPSTREAM_URL)' -O '$(ZIPFILE)'
-	unzip -d '$(UNPACK_DIR)' '$(ZIPFILE)'
-	GZIP="-9fn --rsyncable" tar -czf $(TARFILE) $(UNPACK_DIR)	\
-		--exclude='StreamingContext.cs'				\
-		--exclude='*.chm'					\
-		--exclude='*.dll'					\
-		--exclude='*.exe'					\
-		--exclude='*.pdb'
-	rm -r $(ZIPFILE) $(UNPACK_DIR)
+	uscan --force-download --destdir=. --download-version=$(upstream_version)
+	rm -rf newtonsoft-json-$(upstream_version)/
+	mkdir -p newtonsoft-json-$(upstream_version)/
+	tar xf newtonsoft-json_$(upstream_version).orig.tar.gz -C newtonsoft-json-$(upstream_version)/ --strip-components 1
+	rm -fr newtonsoft-json-$(upstream_version)/Tools
+	tar cfz newtonsoft-json_$(upstream_version)+dfsg.orig.tar.gz newtonsoft-json-$(upstream_version)/
+	rm -rf newtonsoft-json-$(upstream_version)/
 
 %:
 	dh $@ --with=cli

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-libs/packages/newtonsoft-json.git



More information about the Pkg-cli-libs-commits mailing list