r7863 - /trunk/libquota-perl/debian/repack.sh

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat Sep 22 12:44:42 UTC 2007


Author: dmn
Date: Sat Sep 22 12:44:42 2007
New Revision: 7863

URL: http://svn.debian.org/wsvn/?sc=1&rev=7863
Log:
Fixed repack.sh to use $pkg-$up_ver.orig as directory name in the repackaged .orig.tar.gz

Modified:
    trunk/libquota-perl/debian/repack.sh

Modified: trunk/libquota-perl/debian/repack.sh
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/debian/repack.sh?rev=7863&op=diff
==============================================================================
--- trunk/libquota-perl/debian/repack.sh (original)
+++ trunk/libquota-perl/debian/repack.sh Sat Sep 22 12:44:42 2007
@@ -1,11 +1,14 @@
 #!/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
 
 FILE=$3
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+VER=`dpkg-parsechangelog|grep ^Version:|sed 's/^Version: //; s/+dfsg-[^-]\+$//'`
 
 printf "\nRepackaging $FILE\n"
 
@@ -17,12 +20,20 @@
 REPACK=`basename $FILE`
 
 UP_DIR=`ls -1 $DIR`
+
 (
+    set -e
+    set -u
+
     cd $DIR
+
     rm -v $UP_DIR/vxquotactl.c
-    mv $UP_DIR $UP_DIR.orig
-    tar -czf $REPACK $UP_DIR.orig
+
+    REPACK_DIR="$PKG-$VER.orig"
+    mv $UP_DIR $REPACK_DIR
+    tar -c $REPACK_DIR | gzip -9 > $REPACK
 )
+
 mv $DIR/$REPACK $FILE
 
 echo "*** $FILE repackaged"




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