[med-svn] r9044 - trunk/packages/sofa-framework/trunk/debian

Andreas Tille tille at alioth.debian.org
Mon Dec 19 14:51:05 UTC 2011


Author: tille
Date: 2011-12-19 14:51:04 +0000 (Mon, 19 Dec 2011)
New Revision: 9044

Added:
   trunk/packages/sofa-framework/trunk/debian/get-orig-source
Modified:
   trunk/packages/sofa-framework/trunk/debian/changelog
Log:
Do not hardcode release version in get-orig-source


Modified: trunk/packages/sofa-framework/trunk/debian/changelog
===================================================================
--- trunk/packages/sofa-framework/trunk/debian/changelog	2011-12-19 14:47:04 UTC (rev 9043)
+++ trunk/packages/sofa-framework/trunk/debian/changelog	2011-12-19 14:51:04 UTC (rev 9044)
@@ -2,6 +2,8 @@
 
   * New upstream version
   * debian/watch: also seek for https URLs
+  * debian/get-orig-source: Fetch any new version not only one hard
+    coded version
 
  -- Andreas Tille <tille at debian.org>  Mon, 19 Dec 2011 15:05:24 +0100
 

Added: trunk/packages/sofa-framework/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/sofa-framework/trunk/debian/get-orig-source	                        (rev 0)
+++ trunk/packages/sofa-framework/trunk/debian/get-orig-source	2011-12-19 14:51:04 UTC (rev 9044)
@@ -0,0 +1,47 @@
+#!/bin/sh
+# get source for sofa-framework which assembles sofa-framework, sofa-modules and sofa-applications
+
+set -e
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+
+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.rcbeta]\+\) .*sofa-framework.*?\1?'`
+    if echo "$VERSION" | grep -q "upstream-version" ; then
+        echo "Unable to parse version number"
+        exit
+    fi
+fi
+
+TARBALLDIR=../tarballs
+mkdir -p ${TARBALLDIR}
+mv ../${NAME}-${VERSION}.zip ${TARBALLDIR}
+
+indexpage=`grep www.sofa-framework.org debian/watch | sed 's/^.*\(http:[^[:space:]]\+\)[[:space:]].*$/\1/'`
+cd ${TARBALLDIR}
+wget -q -N "$indexpage"
+wget -q -N `grep modules.*\.zip download | sed "s?^.*\(https://gforge.inria.fr/frs/download.php/[0-9]\+/sofa-modules-${VERSION}\.zip\).*?\1?"`
+wget -q -N `grep applications.*\.zip download | sed "s?^.*\(https://gforge.inria.fr/frs/download.php/[0-9]\+/sofa-applications-${VERSION}\.zip\).*?\1?"`
+rm download
+
+OUTPUTDIR=sofa-${VERSION}
+rm -rf ${OUTPUTDIR}
+mkdir -p ${OUTPUTDIR}
+cd ${OUTPUTDIR}
+
+find .. -mindepth 1 -maxdepth 1 -name "sofa-*.zip" -exec unzip -q \{\} \;
+find .. -mindepth 1 -maxdepth 1 -name "sofa-*.zip" -delete
+
+rm -rf extlibs/miniBoost       # libboost-dev
+rm -rf extlibs/libQGLViewer    # libqglviewer-dev
+rm -rf extlibs/qwt             # libqwt-dev
+rm -rf extlibs/newmat          # libnewmat10-dev
+rm -rf extlibs/csparse         # libsuitesparse-dev
+# the external libraries are still there:
+# LML  miniFlowVR  PML tinyxml
+
+cd ..
+
+GZIP="--best --no-name" tar czf sofa-framework_${VERSION}.orig.tar.gz ${OUTPUTDIR}
+rm -rf ${OUTPUTDIR}


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




More information about the debian-med-commit mailing list