[DRE-commits] r5111 - trunk/libdataobjects-ruby/debian
Deepak Tripathi
deepak-guest at alioth.debian.org
Wed Apr 14 09:50:41 UTC 2010
Author: deepak-guest
Date: 2010-04-14 09:50:40 +0000 (Wed, 14 Apr 2010)
New Revision: 5111
Added:
trunk/libdataobjects-ruby/debian/README.Debian-Source
trunk/libdataobjects-ruby/debian/repack.sh
Modified:
trunk/libdataobjects-ruby/debian/watch
Log:
Added repack.sh .bcz upstream does not provide it, also updating debian/watch
Added: trunk/libdataobjects-ruby/debian/README.Debian-Source
===================================================================
--- trunk/libdataobjects-ruby/debian/README.Debian-Source (rev 0)
+++ trunk/libdataobjects-ruby/debian/README.Debian-Source 2010-04-14 09:50:40 UTC (rev 5111)
@@ -0,0 +1,6 @@
+ Upstream does not provide tarball. Therefore the repack.sh file
+ runs to produce the orig.tar.gz.
+
+ -- Deepak Tripathi <apenguinlinux at gmail.com> Tue, 13 Apr 2010 05:28:10 +0000
+
+
\ No newline at end of file
Added: trunk/libdataobjects-ruby/debian/repack.sh
===================================================================
--- trunk/libdataobjects-ruby/debian/repack.sh (rev 0)
+++ trunk/libdataobjects-ruby/debian/repack.sh 2010-04-14 09:50:40 UTC (rev 5111)
@@ -0,0 +1,43 @@
+#!/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"
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+
+REPACK_DIR="$PKG-$VER.orig"
+
+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"
+gem unpack "$FILE" --target "$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
+
+## Change permissions, otherwise dpkg-source -x fails
+chmod 755 "$UP_BASE"
+## 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"
Property changes on: trunk/libdataobjects-ruby/debian/repack.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/libdataobjects-ruby/debian/watch
===================================================================
--- trunk/libdataobjects-ruby/debian/watch 2010-04-13 17:21:53 UTC (rev 5110)
+++ trunk/libdataobjects-ruby/debian/watch 2010-04-14 09:50:40 UTC (rev 5111)
@@ -2,4 +2,4 @@
version=3
http://rubyforge.org/frs/?group_id=4651&release_id=34564 \
- .*/data_objects-(.*)\.(tgz|gem)
+ .*/data_objects-(.*)\.(tgz|gem) debian debian/repack.sh
More information about the Pkg-ruby-extras-commits
mailing list