[DRE-commits] [ruby-wikicloth] 10/13: d/rules: Add get-orig-source to repackage tarball

Per Andersson avtobiff-guest at moszumanska.debian.org
Thu Feb 27 02:06:53 UTC 2014


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

avtobiff-guest pushed a commit to branch master
in repository ruby-wikicloth.

commit 153dec5bccb725095663e0fcc199ec58b9ccbe6a
Author: Per Andersson <avtobiff at gmail.com>
Date:   Thu Feb 27 02:50:15 2014 +0100

    d/rules: Add get-orig-source to repackage tarball
    
    Upstream ships the Wikipedia logotype which is not DFSG free. This is
    removed from the orig tar.
---
 debian/README.source      | 11 +++++++++++
 debian/get-orig-source.sh | 16 ++++++++++++++++
 debian/rules              |  3 +++
 3 files changed, 30 insertions(+)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..03fb47c
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,11 @@
+FETCH NEW UPSTREAM SOURCE
+=========================
+
+Upstream ships the Wikipedia logo which is not DFSG free.
+
+In order to get a DFSG free tarball, just run the `get-orig-source` target in
+`debian/rules`, or execute the shell script `debian/get-orig-source.sh` that
+does the work.
+
+--
+Per Andersson <avtobiff at gmail.com>
diff --git a/debian/get-orig-source.sh b/debian/get-orig-source.sh
new file mode 100755
index 0000000..6297801
--- /dev/null
+++ b/debian/get-orig-source.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+package="ruby-wikicloth"
+
+file=$(uscan --verbose | \
+        sed -n '/Successfully downloaded updated package/ {s/.*updated package \(.*\)$/\1/; p}')
+version="$(echo $file | sed 's/^v\(.*\)\.tar\.gz/\1/')+dfsg"
+path=../$file
+
+gzip -d < $path | \
+    tar --delete --wildcards -f - '*/sample_documents/wiki.png' | \
+    gzip > ../$package-$version.tar.gz
+rm $path
+echo "Repackaged ../$package-$version.tar.gz"
diff --git a/debian/rules b/debian/rules
index 1b29c87..7aa4984 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,3 +29,6 @@ override_dh_auto_install:
 	rm -f debian/ruby-wikicloth/usr/lib/ruby/vendor_ruby/wikicloth/extensions/lua/COPYING
 	# remove bundled jquery.js
 	rm -f debian/ruby-wikicloth/usr/share/doc/ruby-wikicloth-doc/html/js/jquery.js
+
+get-orig-source:
+	debian/get-orig-source.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-wikicloth.git



More information about the Pkg-ruby-extras-commits mailing list