[SCM] Packaging of padre perl editor branch, master, updated. upstream/0.25-91-g67f66ca

Damyan Ivanov dmn at debian.org
Sat Feb 14 08:20:58 UTC 2009


The following commit has been merged in the master branch:
commit 121656f1e04e3900a7ae0688221ddedfb98147fe
Author: Damyan Ivanov <dmn at debian.org>
Date:   Fri Feb 13 23:08:09 2009 +0200

    repackage upstream sources
    
    remove eg/hangman.p6 which has no license
    remove generated .mo files from share/locale

diff --git a/debian/repack.sh b/debian/repack.sh
new file mode 100644
index 0000000..9fadebf
--- /dev/null
+++ b/debian/repack.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Repack upstream source removing generated (.mo) files
+# and eg/hangman.p6, which has no license and is certainly
+# copyrighted
+#
+# To be called via debian/watch (uscan or uscan --force)
+# or
+#  sh debian/repack.sh --upstream-version VER FILE
+
+set -e
+set -u
+
+usage() {
+    cat <<EOF >& 2
+Usage: $0 --upstream-version VER FILE
+
+            or
+
+       uscan [--force]
+EOF
+}
+
+[ "${1:-}" = "--upstream-version" ] \
+    && [ -n "${2:-}" ] \
+    && [ -n "${3:-}" ] \
+    && [ -z "${4:-}" ] \
+    || usage
+
+TMPDIR=`mktemp -d -p .`
+
+trap "rm -rf $TMPDIR" INT QUIT 0
+
+VER="$2"
+DEB_VER="${VER}.ds1"
+UP_VER="${VER}"
+UPSTREAM_TAR="$3"
+UPSTREAM_DIR=Padre-${UP_VER}
+ORIG="../padre_${DEB_VER}.orig.tar.gz"
+ORIG_DIR="padre-${DEB_VER}.orig"
+
+if [ -e "$ORIG" ]; then
+    echo "$ORIG already exists. Aborting."
+    exit 1
+fi
+
+echo -n "Expanding upstream source tree..."
+tar xzf $UPSTREAM_TAR -C $TMPDIR
+echo " done."
+
+# clean generated files
+echo "Cleaning upstream sources from generated files..."
+for f in `cd $TMPDIR/$UPSTREAM_DIR/share/locale; ls -1 *.mo` ;
+do
+    echo "  share/locale/$f"
+    rm $TMPDIR/$UPSTREAM_DIR/share/locale/$f
+done
+
+echo "Remmoving copyrighted files without a license..."
+for f in eg/hangman.p6 ;
+do
+    echo "  $f"
+    rm $TMPDIR/$UPSTREAM_DIR/$f
+done
+
+
+mv $TMPDIR/$UPSTREAM_DIR $TMPDIR/$ORIG_DIR
+
+echo -n Repackaging into ${ORIG} ...
+tar c -C $TMPDIR $ORIG_DIR | gzip -n -9 > "$ORIG"
+echo " done."
diff --git a/debian/watch b/debian/watch
index 6293850..faed0e1 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 # format version number, currently 3; this line is compulsory!
 version=3
 # URL to the package page followed by a regex to search
-http://search.cpan.org/dist/Padre/   .*/Padre-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
+http://search.cpan.org/dist/Padre/   .*/Padre-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian sh debian/repack.sh

-- 
Packaging of padre perl editor



More information about the Pkg-perl-cvs-commits mailing list