[med-svn] r12058 - trunk/packages/rdp-classifier/trunk/debian

Andreas Tille tille at alioth.debian.org
Wed Aug 15 09:52:35 UTC 2012


Author: tille
Date: 2012-08-15 09:52:35 +0000 (Wed, 15 Aug 2012)
New Revision: 12058

Added:
   trunk/packages/rdp-classifier/trunk/debian/get-orig-source
Modified:
   trunk/packages/rdp-classifier/trunk/debian/rules
   trunk/packages/rdp-classifier/trunk/debian/watch
Log:
Wrote get-orig-source target to make sure we are basing our work on the same source tarball.  If you do not like xz compression for whatever reason just set COMPRESSION=gz in debian/get-orig-source


Added: trunk/packages/rdp-classifier/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/get-orig-source	                        (rev 0)
+++ trunk/packages/rdp-classifier/trunk/debian/get-orig-source	2012-08-15 09:52:35 UTC (rev 12058)
@@ -0,0 +1,48 @@
+#!/bin/sh
+# if you need to repack for whatever reason you can
+# use this script via uscan or directly
+#
+# FIXME: currently the code is not conform to Debian Policy
+#        http://www.debian.org/doc/debian-policy/ch-source.html
+#        "get-orig-source (optional)"
+#        This target may be invoked in any directory, ...
+# --> currently it is assumed the script is called in the
+#     source directory featuring the debian/ dir
+
+COMPRESS=xz
+
+set -e
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+UNAME=`echo ${NAME} | sed 's/-/_/g'`
+
+if ! echo $@ | grep -q upstream-version ; then
+    VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
+    uscan --force-download
+else
+    VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*${UNAME}.*?\1?"`
+    if echo "$VERSION" | grep -q "upstream-version" ; then
+        echo "Unable to parse version number"
+        exit
+    fi
+fi
+
+set -x
+TARDIR=${NAME}-${VERSION}
+mkdir -p ../tarballs
+cd ../tarballs
+# need to clean up the tarballs dir first because upstream tarball might
+# contain a directory with unpredictable name
+rm -rf *
+unzip -q ../${UNAME}_${VERSION}.zip
+mv ${UNAME}_${VERSION} ${TARDIR}
+rm -rf __MACOSX
+
+# Remove JAR files with the exception of ReadSeq.jar
+for jar in `find ${TARDIR} -type f -name "*.jar"` ; do
+    if ! echo $jar | grep -q "ReadSeq.jar$" ; then
+	rm -rf $jar
+    fi
+done
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
+rm -rf ${TARDIR}


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

Modified: trunk/packages/rdp-classifier/trunk/debian/rules
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/rules	2012-08-15 09:32:16 UTC (rev 12057)
+++ trunk/packages/rdp-classifier/trunk/debian/rules	2012-08-15 09:52:35 UTC (rev 12058)
@@ -25,3 +25,6 @@
 	##NR## rm -f "*.jar" lib/*.jar
 	rm -f rdp_classifier.jar
 	rm -f *.list
+
+get-orig-source:
+	uscan --verbose --force-download

Modified: trunk/packages/rdp-classifier/trunk/debian/watch
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/watch	2012-08-15 09:32:16 UTC (rev 12057)
+++ trunk/packages/rdp-classifier/trunk/debian/watch	2012-08-15 09:52:35 UTC (rev 12058)
@@ -1,3 +1,4 @@
 version=3
 opts=dversionmangle=s/\~dfsg// \
-  http://sf.net/rdp-classifier/rdp_classifier_(.*).zip
+  http://sf.net/rdp-classifier/rdp_classifier_(.*).zip \
+  debian debian/get-orig-source
\ No newline at end of file




More information about the debian-med-commit mailing list