r27408 - in /trunk/libxml-libxml-perl/debian: changelog repack.sh watch

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Fri Nov 28 20:57:27 UTC 2008


Author: gregoa
Date: Fri Nov 28 20:57:24 2008
New Revision: 27408

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27408
Log:
Add a debian/repack.sh script that creates the .ds version from the
upstream tarball: it removes the debian/ directory and the lines
referencing it in MANIFEST.

Added:
    trunk/libxml-libxml-perl/debian/repack.sh   (with props)
Modified:
    trunk/libxml-libxml-perl/debian/changelog
    trunk/libxml-libxml-perl/debian/watch

Modified: trunk/libxml-libxml-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-perl/debian/changelog?rev=27408&op=diff
==============================================================================
--- trunk/libxml-libxml-perl/debian/changelog (original)
+++ trunk/libxml-libxml-perl/debian/changelog Fri Nov 28 20:57:24 2008
@@ -6,6 +6,9 @@
     (source stanza).
   * New upstream release.
   * debian/watch: extended regexp for matching upstream releases.
+  * Add a debian/repack.sh script that creates the .ds version from the
+    upstream tarball: it removes the debian/ directory and the lines
+    referencing it in MANIFEST.
 
  -- gregor herrmann <gregoa at debian.org>  Wed, 06 Aug 2008 21:34:23 -0300
 

Added: trunk/libxml-libxml-perl/debian/repack.sh
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-perl/debian/repack.sh?rev=27408&op=file
==============================================================================
--- trunk/libxml-libxml-perl/debian/repack.sh (added)
+++ trunk/libxml-libxml-perl/debian/repack.sh Fri Nov 28 20:57:24 2008
@@ -1,0 +1,50 @@
+#!/bin/sh
+# Repackage upstream source to exclude non-distributable files
+# should be called as "repack.sh --upstream-source <ver> <downloaded file>
+# (for example, via uscan)
+
+set -e
+set -u
+
+VER="$2"
+FILE="$3"
+DVER="${VER}.ds"
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+
+REPACK_DIR="$PKG-$VER.orig" # DevRef § 6.7.8.2
+
+echo -e "\nRepackaging $FILE\n"
+
+DIR=`mktemp -d ./tmpRepackXXXXXX`
+trap "rm -rf \"$DIR\"" QUIT INT EXIT
+
+# Create an extra directory to cope with rootless tarballs
+UP_BASE="$DIR/unpack"
+mkdir "$UP_BASE"
+tar xzf "$FILE" -C "$UP_BASE"
+
+if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then
+	# Tarball does contain a root directory
+	UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`"
+fi
+
+## Here we remove the upstream debian directory and delete all of the 
+## occurences about debian in the MANIFEST file.
+rm -vr $UP_BASE/debian
+cp $UP_BASE/MANIFEST $UP_BASE/MANIFEST.old
+sed '/^debian/d' $UP_BASE/MANIFEST.old > $UP_BASE/MANIFEST
+rm $UP_BASE/MANIFEST.old
+## End
+
+mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+gzip -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.gz"
+
+
+mv "$DIR/repacked.tar.gz" "$FILE"
+
+echo "*** $FILE repackaged"
+
+prename --verbose --force "s/$VER/$DVER/" $FILE

Propchange: trunk/libxml-libxml-perl/debian/repack.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: trunk/libxml-libxml-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-perl/debian/watch?rev=27408&op=diff
==============================================================================
--- trunk/libxml-libxml-perl/debian/watch (original)
+++ trunk/libxml-libxml-perl/debian/watch Fri Nov 28 20:57:24 2008
@@ -1,2 +1,4 @@
 version=3
-http://search.cpan.org/dist/XML-LibXML/ .*/XML-LibXML-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
+options=dversionmangle=s/\.ds// \
+	http://search.cpan.org/dist/XML-LibXML/ .*/XML-LibXML-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ \
+	debian debian/repack.sh




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