[med-svn] r7267 - trunk/packages/circos/trunk/debian
olivier sallou
osallou-guest at alioth.debian.org
Wed Jul 13 13:48:32 UTC 2011
Author: osallou-guest
Date: 2011-07-13 13:48:32 +0000 (Wed, 13 Jul 2011)
New Revision: 7267
Added:
trunk/packages/circos/trunk/debian/get-orig-source
trunk/packages/circos/trunk/debian/watch-tools
Modified:
trunk/packages/circos/trunk/debian/rules
trunk/packages/circos/trunk/debian/watch
Log:
add get-orig-source to get upstream
Added: trunk/packages/circos/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/circos/trunk/debian/get-orig-source (rev 0)
+++ trunk/packages/circos/trunk/debian/get-orig-source 2011-07-13 13:48:32 UTC (rev 7267)
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+
+function downloadAndExtract {
+VERSIONMAIN=$1
+if [ -z $2 ]; then
+COMPONENT=""
+else
+COMPONENT="-$2"
+fi
+MAJOR=$(echo $VERSIONMAIN | cut -d"-" -f1)
+echo "Major: "$MAJOR
+wget http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}.tar.gz
+#echo "should download http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}.tar.gz"
+if [ $? -ne 0 ]; then
+ wget http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}.tgz
+ #echo "should download http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}.tgz"
+ if [ $? -ne 0 ]; then
+ echo "Failed to download main version"
+ exit 1
+ fi
+ MAINFILE=circos${COMPONENT}-${MAJOR}.tgz
+else
+MAINFILE=circos${COMPONENT}-${MAJOR}.tar.gz
+fi
+
+echo "Main file: ${MAINFILE}"
+tar xzf ${MAINFILE}
+cp -R circos${COMPONENT}-${MAJOR}/* $WORKDIR/
+rm -rf circos${COMPONENT}-${MAJOR}
+rm -f ${MAINFILE}
+
+MINOR=$(echo $VERSIONMAIN | cut -d"-" -f2)
+echo "Minor: "$MINOR
+if [ "${MINOR}" == "${MAJOR}" ]; then
+echo "No patch to apply"
+else
+for (( MINORCOUNT=1; MINORCOUNT<=${MINOR}; MINORCOUNT++ ))
+do
+ echo "download and extract ${MINORCOUNT}"
+ wget http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}-${MINORCOUNT}.tar.gz
+ #echo "Should download http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}-${MINORCOUNT}.tar.gz"
+ if [ $? -ne 0 ]; then
+ wget http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}-${MINORCOUNT}.tgz
+ #echo "Should download http://circos.ca/distribution/circos${COMPONENT}-${MAJOR}-${MINORCOUNT}.tgz"
+ if [ $? -ne 0 ]; then
+ echo "Failed to download patch version ${MINORCOUNT}"
+ exit 1
+ fi
+ MINORFILE=circos${COMPONENT}-${MAJOR}-${MINORCOUNT}.tgz
+ else
+ MINORFILE=circos${COMPONENT}-${MAJOR}-${MINORCOUNT}.tar.gz
+ fi
+ echo "Minor file: ${MINORFILE}"
+ tar xfz ${MINORFILE}
+ cp -R circos${COMPONENT}-${MAJOR}-${MINORCOUNT}/* $WORKDIR/
+ rm -rf circos${COMPONENT}-${MAJOR}-${MINORCOUNT}
+ rm -f ${MINORFILE}
+done
+fi
+
+}
+
+
+PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+VERSIONMAIN=`uscan --rename --verbose --timeout 60 |
+ grep "Newest version on remote site is .* local version is .*" |
+ head -n 1 |
+ sed "s/Newest version on remote site is \([a-z0-9.\-]\+\),.*/\1/"`
+
+echo "Main: $VERSIONMAIN"
+
+VERSIONTOOLS=`uscan --watchfile debian/watch-tools --rename --verbose --timeout 60 |
+ grep "Newest version on remote site is .* local version is .*" |
+ head -n 1 |
+ sed "s/Newest version on remote site is \([a-z0-9.\-]\+\),.*/\1/"`
+
+
+VERSION=`dpkg-parsechangelog | awk '/^Version/ { print $2 }'`
+
+cd ../tarballs
+mkdir -p ${PKG}_${VERSION}.orig
+export WORKDIR="${PKG}_${VERSION}.orig"
+
+downloadAndExtract $VERSIONMAIN
+
+echo "Tools: $VERSIONTOOLS"
+
+downloadAndExtract $VERSIONTOOLS "tools"
+
+tar cvf ${WORKDIR}.tar ${WORKDIR}
+gzip ${WORKDIR}.tar
+#rm -rf ${WORKDIR}
Property changes on: trunk/packages/circos/trunk/debian/get-orig-source
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/packages/circos/trunk/debian/rules
===================================================================
--- trunk/packages/circos/trunk/debian/rules 2011-07-13 11:06:19 UTC (rev 7266)
+++ trunk/packages/circos/trunk/debian/rules 2011-07-13 13:48:32 UTC (rev 7267)
@@ -24,3 +24,5 @@
find debian/circos-tutorials -type f | xargs sed -i 's/include data/include \/var\/lib\/circos\/data/g'
find debian/circos-tutorials -type f | xargs sed -i 's/= data/= \/var\/lib\/circos\/data/g'
+get-orig-source:
+ . debian/get-orig-source
Modified: trunk/packages/circos/trunk/debian/watch
===================================================================
--- trunk/packages/circos/trunk/debian/watch 2011-07-13 11:06:19 UTC (rev 7266)
+++ trunk/packages/circos/trunk/debian/watch 2011-07-13 13:48:32 UTC (rev 7267)
@@ -1,2 +1,2 @@
version=3
-http://circos.ca/software/download .*/distribution/circos-([-.\d]*).tar.gz
+http://circos.ca/software/download .*/distribution/circos-([-.\d]*).(?:tar(?:\.gz|\.bz2)?|tgz|zip)
Added: trunk/packages/circos/trunk/debian/watch-tools
===================================================================
--- trunk/packages/circos/trunk/debian/watch-tools (rev 0)
+++ trunk/packages/circos/trunk/debian/watch-tools 2011-07-13 13:48:32 UTC (rev 7267)
@@ -0,0 +1,2 @@
+version=3
+http://circos.ca/software/download .*/distribution/circos-tools-([-.\d]*).(?:tar(?:\.gz|\.bz2)?|tgz|zip)
More information about the debian-med-commit
mailing list