[med-svn] r10653 - trunk/packages/saint/trunk/debian

Andreas Tille tille at alioth.debian.org
Wed May 2 14:15:30 UTC 2012


Author: tille
Date: 2012-05-02 14:15:30 +0000 (Wed, 02 May 2012)
New Revision: 10653

Added:
   trunk/packages/saint/trunk/debian/get-orig-source
Modified:
   trunk/packages/saint/trunk/debian/rules
   trunk/packages/saint/trunk/debian/watch
Log:
Fix upstream tarball


Added: trunk/packages/saint/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/saint/trunk/debian/get-orig-source	                        (rev 0)
+++ trunk/packages/saint/trunk/debian/get-orig-source	2012-05-02 14:15:30 UTC (rev 10653)
@@ -0,0 +1,34 @@
+#!/bin/sh
+# get source for SAINT because upstream archive is bloated by macosx specific
+# stuff which breaks dpkg-buildpackage
+# -> http://lists.debian.org/debian-qa/2012/04/msg00057.html
+
+set -e
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+UCNAME=`echo $NAME | tr [a-z] [A-Z]`
+
+if ! echo $@ | grep -q upstream-version ; then
+    VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
+else
+    VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*${UCNAME}.*?\1?"`
+    if echo "$VERSION" | grep -q "upstream-version" ; then
+        echo "Unable to parse version number"
+        exit
+    fi
+fi
+
+mkdir -p ../tarballs
+cd ../tarballs
+upstream="${UCNAME}_v${VERSION}"
+unzip -q ../${upstream}.zip
+rm -rf __MACOSX
+
+# once we are changing the tarball anyway we could fix some other nasty things
+# this will be suggested upstream for the future
+find ${upstream} -name .DS_Store -delete
+find ${upstream} -name "*~" -type f -delete
+find ${upstream} -name "*.c" -type f -exec chmod a-x \{\} \;
+find ${upstream} -name "*.h" -type f -exec chmod a-x \{\} \;
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -czf "$NAME"_"$VERSION".orig.tar.gz "${upstream}"
+rm -rf "$upstream"


Property changes on: trunk/packages/saint/trunk/debian/get-orig-source
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/packages/saint/trunk/debian/rules
===================================================================
--- trunk/packages/saint/trunk/debian/rules	2012-05-02 12:15:52 UTC (rev 10652)
+++ trunk/packages/saint/trunk/debian/rules	2012-05-02 14:15:30 UTC (rev 10653)
@@ -12,5 +12,5 @@
 	rm -rf bin
 
 get-orig-source:
-	mkdir -p ../tarballs
-	uscan --verbose --force-download --repack --rename --destdir=../tarballs
+	# repack in debian/get-orig-source to avoid trouble with dirty archive
+	uscan --verbose --force-download

Modified: trunk/packages/saint/trunk/debian/watch
===================================================================
--- trunk/packages/saint/trunk/debian/watch	2012-05-02 12:15:52 UTC (rev 10652)
+++ trunk/packages/saint/trunk/debian/watch	2012-05-02 14:15:30 UTC (rev 10653)
@@ -1,2 +1,3 @@
 version=3
-http://sf.net/saint-apms/SAINT_v\.?([.\d]+)\.zip
+http://sf.net/saint-apms/SAINT_v\.?([.\d]+)\.zip \
+   debian debian/get-orig-source




More information about the debian-med-commit mailing list