[DRE-commits] r3484 - packages/libopenid-ruby/trunk/debian

Ryan Niebur ryan52-guest at alioth.debian.org
Thu Apr 30 00:22:06 UTC 2009


Author: ryan52-guest
Date: 2009-04-30 00:22:05 +0000 (Thu, 30 Apr 2009)
New Revision: 3484

Added:
   packages/libopenid-ruby/trunk/debian/README.source
   packages/libopenid-ruby/trunk/debian/repack.sh
Log:
forgot to svn add

Added: packages/libopenid-ruby/trunk/debian/README.source
===================================================================
--- packages/libopenid-ruby/trunk/debian/README.source	                        (rev 0)
+++ packages/libopenid-ruby/trunk/debian/README.source	2009-04-30 00:22:05 UTC (rev 3484)
@@ -0,0 +1,7 @@
+The tarball is repacked by debian/repack.sh, which is called
+automatically from uscan.
+
+Patches to the upstream source are applied during build from
+debian/patches/. Use "make -f debian/rules apply-patches" to apply
+them and "make -f debian/rules reverse-patches" to unapply them.
+You can use cdbs-edit-patch(1) to edit these patches.

Added: packages/libopenid-ruby/trunk/debian/repack.sh
===================================================================
--- packages/libopenid-ruby/trunk/debian/repack.sh	                        (rev 0)
+++ packages/libopenid-ruby/trunk/debian/repack.sh	2009-04-30 00:22:05 UTC (rev 3484)
@@ -0,0 +1,42 @@
+#!/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="$2debian"
+FILE="$3"
+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 xjf "$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
+
+## Remove stuff
+rm -vfr $UP_BASE/lib/hmac
+## 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"
+FILE="../${PKG}_${VER}.orig.tar.gz"
+mv "$DIR/repacked.tar.gz" "$FILE"
+
+echo "*** $FILE repackaged"


Property changes on: packages/libopenid-ruby/trunk/debian/repack.sh
___________________________________________________________________
Added: svn:executable
   + *




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