[med-svn] r9625 - trunk/packages/fis-gtm/fis-gtm/trunk/debian
Andreas Tille
tille at alioth.debian.org
Wed Feb 8 08:51:40 UTC 2012
Author: tille
Date: 2012-02-08 08:51:40 +0000 (Wed, 08 Feb 2012)
New Revision: 9625
Added:
trunk/packages/fis-gtm/fis-gtm/trunk/debian/watch
Modified:
trunk/packages/fis-gtm/fis-gtm/trunk/debian/changelog
trunk/packages/fis-gtm/fis-gtm/trunk/debian/get-orig-source
trunk/packages/fis-gtm/fis-gtm/trunk/debian/rules
Log:
Use uscan to create orig.tar.gz; in next commit get-orig-source will include the extra files prepared by Luis
Modified: trunk/packages/fis-gtm/fis-gtm/trunk/debian/changelog
===================================================================
--- trunk/packages/fis-gtm/fis-gtm/trunk/debian/changelog 2012-02-08 05:16:37 UTC (rev 9624)
+++ trunk/packages/fis-gtm/fis-gtm/trunk/debian/changelog 2012-02-08 08:51:40 UTC (rev 9625)
@@ -1,5 +1,6 @@
-fis-gtm (54002B-1) UNRELEASED; urgency=low
+fis-gtm (5.4-002B-1) UNRELEASED; urgency=low
+ [ Luis Ibanez ]
* Initial release, helps to close #541239
* New upstream version
* Modified upstream version
@@ -7,10 +8,25 @@
- In this way, this can be build with only GCC
- Solves bootstrapping challenges.
- -- Luis Ibanez <luis.ibanez at kitware.com> Tue, 7 Feb 2012 17:39:07 -0500
+ [ Andreas Tille ]
+ * debian/changelog: switch to "uncompressed" version numbers
+ * debian/watch: Added watch file
+ * debian/get-orig-source:
+ - Download original source tarball
+ - Try to inspect index page on sourceforge for real (uncompressed)
+ version number
+ - unpack original tarball into separate and versioned dir
+ - pack tarball as "non-dirty" tarball
+ TODO: Add separate files prepared by Luis
+ * debian/rules:
+ - get-orig-source target uses uscan
+ - dropped info about UPSTREAM_SITE which is implicitely given
+ in debian/watch
-fis-gtm (54002A) UNRELEASED; urgency=low
+ -- Andreas Tille <tille at debian.org> Wed, 08 Feb 2012 09:45:13 +0100
+fis-gtm (5.4-002A-1) UNRELEASED; urgency=low
+
* Initial release (Closes: #541239)
-- Thorsten Alteholz <debian at alteholz.de> Mon, 13 Jun 2011 19:34:17 +0200
Modified: trunk/packages/fis-gtm/fis-gtm/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/fis-gtm/fis-gtm/trunk/debian/get-orig-source 2012-02-08 05:16:37 UTC (rev 9624)
+++ trunk/packages/fis-gtm/fis-gtm/trunk/debian/get-orig-source 2012-02-08 08:51:40 UTC (rev 9625)
@@ -1,18 +1,46 @@
-#!/usr/bin/sh
+#!/bin/sh
+# get source for fis-gtm including extra autogenerated files provided separately
+# to enable build without existing Mumps compiler
-UPSTREAM_SRC=gtm_V54002B_linux_i686_src
-UPSTREAM_SRC_TGZ=${UPSTREAM_SRC}.tar.gz
+set -e
+set -x
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+UPSTREAMNAME=`echo $NAME | sed 's/^fis-//'`
-UPSTREAM_EXTRAS_SRC=gtm_V54002B_linux_i686_src_extras
-UPSTREAM_EXTRAS_SRC_TGZ=${UPSTREAM_EXTRAS_SRC}.tar.gz
+if ! echo $@ | grep -q upstream-version ; then
+ VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
+ # regard dversionmangle
+ VERSION=`echo ${VERSION} | sed 's/[.-]//g'`
+else
+ VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9A-Z]\+\) .*${NAME}.*?\1?"`
+ if echo "$VERSION" | grep -q "upstream-version" ; then
+ echo "Unable to parse version number"
+ exit
+ fi
+fi
-ORIGINAL_TGZ=fis-gtm_54002B.orig.tar.gz
+TARBALLDIR=../tarballs
+mkdir -p ${TARBALLDIR}
+cd ${TARBALLDIR}
+mv ../${UPSTREAMNAME}_V${VERSION}*.tar.gz .
-mkdir -p fis-gtm
-cd fis-gtm
-tar xzf ../${UPSTREAM_SRC_TGZ}
-cd ..
-tar xzf ${UPSTREAM_EXTRAS_SRC_TGZ}
-tar czf ${ORIGINAL_TGZ} fis-gtm
-rm -rf fis-gtm
-mv ${ORIGINAL_TGZ} ..
+# obtain "real" version number from subdirectory name at SF
+wget -q -N http://sourceforge.net/projects/fis-gtm/files/GT.M-x86-Linux-src/
+grep $VERSION index.html > index_tmp
+PKGVERSION=`grep $VERSION index.html | sed "s?.*x86-Linux/V\([-0-9.A-Z]\+\)/gtm_V${VERSION}_linux_.*?\1?" | head -n 1`
+
+# check whether we found the real version
+TMPVERSION=`echo $PKGVERSION | sed 's/[.-]//g'`
+
+if [ "$TMPVERSION" = "$VERSION" ] ; then
+ OUTPUTDIR=${NAME}-${PKGVERSION}
+ mkdir ${OUTPUTDIR}
+ cd ${OUTPUTDIR}
+ tar -xzf ../${UPSTREAMNAME}_V${VERSION}*.tar.gz
+ cd ..
+
+ GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -czf ${NAME}_${PKGVERSION}.orig.tar.gz ${OUTPUTDIR}
+ rm -rf ${OUTPUTDIR}
+else
+ echo "Failed to detect real version from Sourceforge index file. Please check regular expression"
+fi
Modified: trunk/packages/fis-gtm/fis-gtm/trunk/debian/rules
===================================================================
--- trunk/packages/fis-gtm/fis-gtm/trunk/debian/rules 2012-02-08 05:16:37 UTC (rev 9624)
+++ trunk/packages/fis-gtm/fis-gtm/trunk/debian/rules 2012-02-08 08:51:40 UTC (rev 9625)
@@ -5,10 +5,6 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-UPSTREAM_SRC = gtm_V54002B_linux_i686_src
-UPSTREAM_SITE = http://sourceforge.net/projects/fis-gtm/files/GT.M-x86-Linux-src/V5.4-002B
-UPSTREAM_SRC_TGZ = $(UPSTREAM_SRC).tar.gz
-
UPSTREAM_EXTRAS_SRC = gtm_V54002B_linux_i686_src_extras
UPSTREAM_EXTRAS_SITE = http://public.kitware.com/pub/itk/OSEHRA
UPSTREAM_EXTRAS_SRC_TGZ = $(UPSTREAM_EXTRAS_SRC).tar.gz
@@ -23,12 +19,8 @@
override_dh_auto_install:
-$(UPSTREAM_SRC_TGZ):
- wget $(UPSTREAM_SITE)/$(UPSTREAM_SRC_TGZ)
-
$(UPSTREAM_EXTRAS_SRC_TGZ):
wget $(UPSTREAM_EXTRAS_SITE)/$(UPSTREAM_EXTRAS_SRC_TGZ)
-get-orig-source: $(UPSTREAM_SRC_TGZ) $(UPSTREAM_EXTRAS_SRC_TGZ)
- . ./debian/get-orig-source
-
+get-orig-source:
+ uscan --verbose --force-download
Added: trunk/packages/fis-gtm/fis-gtm/trunk/debian/watch
===================================================================
--- trunk/packages/fis-gtm/fis-gtm/trunk/debian/watch (rev 0)
+++ trunk/packages/fis-gtm/fis-gtm/trunk/debian/watch 2012-02-08 08:51:40 UTC (rev 9625)
@@ -0,0 +1,5 @@
+version=3
+opts="dversionmangle=s/[.-]//g" \
+ http://sf.net/fis-gtm/gtm_V(.*)_linux_i686_src\.tar\.gz \
+ debian debian/get-orig-source
+
More information about the debian-med-commit
mailing list