[med-svn] r9335 - trunk/packages/libhmsbeagle/trunk/debian
Andreas Tille
tille at alioth.debian.org
Wed Jan 18 21:18:11 UTC 2012
Author: tille
Date: 2012-01-18 21:18:11 +0000 (Wed, 18 Jan 2012)
New Revision: 9335
Modified:
trunk/packages/libhmsbeagle/trunk/debian/get-orig-source
Log:
Checkout tagged version instead of trunk
Modified: trunk/packages/libhmsbeagle/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/libhmsbeagle/trunk/debian/get-orig-source 2012-01-18 21:14:56 UTC (rev 9334)
+++ trunk/packages/libhmsbeagle/trunk/debian/get-orig-source 2012-01-18 21:18:11 UTC (rev 9335)
@@ -1,16 +1,32 @@
-#!/bin/bash
+#!/bin/sh
+# get source for libbeagle-java from SVN because there is no source tarball distribution
-# Pulls from SVN and uses the "last changed revision" as the version number.
-
set -e
-set -u
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+UPSTREAMNAME=beagle
+UPSTREAMLOC=${UPSTREAMNAME}-lib
-[ $0 = 'debian/get-orig-source' ] && pushd ..
+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.]\+\) .*${UPSTREAMNAME}_release.*?\1?"`
+ if echo "$VERSION" | grep -q "upstream-version" ; then
+ echo "Unable to parse version number"
+ exit
+ fi
+fi
-svn checkout http://beagle-lib.googlecode.com/svn/trunk/ beagle-lib
-BVERS=`( cd beagle-lib ; svn info ) | grep '^Last Changed Rev: ' | sed 's/.*: //'`
-tar --exclude-vcs -cvjf "libhmsbeagle_0.$BVERS.orig.tar.bz2" beagle-lib
-rm -rf beagle-lib
-echo "Checked out beagle-lib from SVN and compressed version 0.$BVERS"
+SVNTAG=`echo ${VERSION} | sed 's/\./_/g'`
+rm -f ../${UPSTREAMNAME}_release_${SVNTAG}
+RELEASE=${UPSTREAMNAME}_release_${SVNTAG}
+TARDIR=${NAME}-${VERSION}
-# popd || true
+mkdir -p ../tarballs
+cd ../tarballs
+# svn export conserves time stamps of the files, checkout does not
+LC_ALL=C svn export http://${UPSTREAMLOC}.googlecode.com/svn/tags/${RELEASE} ${TARDIR}
+
+rm -f "${TARDIR}"/.gitignore
+
+GZIP="--best --no-name" tar -czf "$NAME"_"$VERSION".orig.tar.gz "${TARDIR}"
+rm -rf "${TARDIR}"
More information about the debian-med-commit
mailing list