[Python-modules-commits] r28811 - in packages/python-django-piston/trunk/debian (4 files)

tobald-guest at users.alioth.debian.org tobald-guest at users.alioth.debian.org
Fri May 9 13:32:54 UTC 2014


    Date: Friday, May 9, 2014 @ 13:32:54
  Author: tobald-guest
Revision: 28811

Add repack script, remove lintian-overrides

Added:
  packages/python-django-piston/trunk/debian/repack.sh
Modified:
  packages/python-django-piston/trunk/debian/changelog
  packages/python-django-piston/trunk/debian/watch
Deleted:
  packages/python-django-piston/trunk/debian/source.lintian-overrides

Modified: packages/python-django-piston/trunk/debian/changelog
===================================================================
--- packages/python-django-piston/trunk/debian/changelog	2014-05-09 13:04:24 UTC (rev 28810)
+++ packages/python-django-piston/trunk/debian/changelog	2014-05-09 13:32:54 UTC (rev 28811)
@@ -10,6 +10,7 @@
   * Use dh_python2
   * Bump standards version to 3.9.5 without further change
   * Convert copyright to machine-readable format 1.0
+  * Add repack script, remove lintian-overrides
 
  -- Christophe Siraut <d at tobald.eu.org>  Fri, 09 May 2014 14:26:08 +0200
 

Added: packages/python-django-piston/trunk/debian/repack.sh
===================================================================
--- packages/python-django-piston/trunk/debian/repack.sh	                        (rev 0)
+++ packages/python-django-piston/trunk/debian/repack.sh	2014-05-09 13:32:54 UTC (rev 28811)
@@ -0,0 +1,44 @@
+#!/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
+DEST_DIR=$(dirname "$FILE")
+
+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
+find $UP_BASE -name ".hg*" -exec rm {} \;
+
+## 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="${DEST_DIR}/${PKG}_${VER}.orig.tar.gz"
+mv "$DIR/repacked.tar.gz" "$FILE"
+
+echo "*** $FILE repackaged"


Property changes on: packages/python-django-piston/trunk/debian/repack.sh
___________________________________________________________________
Added: svn:executable
   + *

Deleted: packages/python-django-piston/trunk/debian/source.lintian-overrides
===================================================================
--- packages/python-django-piston/trunk/debian/source.lintian-overrides	2014-05-09 13:04:24 UTC (rev 28810)
+++ packages/python-django-piston/trunk/debian/source.lintian-overrides	2014-05-09 13:32:54 UTC (rev 28811)
@@ -1 +0,0 @@
-python-django-piston source: source-contains-hg-tags-file .hgtags

Modified: packages/python-django-piston/trunk/debian/watch
===================================================================
--- packages/python-django-piston/trunk/debian/watch	2014-05-09 13:04:24 UTC (rev 28810)
+++ packages/python-django-piston/trunk/debian/watch	2014-05-09 13:32:54 UTC (rev 28811)
@@ -2,4 +2,4 @@
 opts=filenamemangle=s#/jespern/django-piston/get/([\d\.]*)\.tar\.bz2#python-django-piston_$1\.orig\.tar\.bz2# \
   http://bitbucket.org/jespern/django-piston/downloads/ \
   /jespern/django-piston/get/([\d\.]*)\.tar\.bz2 \
-  debian svn-upgrade
+  debian repack.sh




More information about the Python-modules-commits mailing list