[med-svn] [indelible] 01/02: improves tarball

Fabian Klötzl kloetzl-guest at moszumanska.debian.org
Fri Dec 25 14:54:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

kloetzl-guest pushed a commit to branch master
in repository indelible.

commit 6c55c28e673da640241bee75fe8962e660614271
Author: Fabian Klötzl <fabian at kloetzl.info>
Date:   Fri Dec 25 15:39:45 2015 +0100

    improves tarball
    
    The upstream tarball comes with pre-build binaries for Windows and Mac,
    these are now removed. Furthermore the d/get-orig-source script is now
    much more sophisticated and fixes the above issues and makes the tarball
    follow Debians naming convention.
---
 debian/get-orig-source | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/debian/get-orig-source b/debian/get-orig-source
old mode 100644
new mode 100755
index f58b648..20a1d76
--- a/debian/get-orig-source
+++ b/debian/get-orig-source
@@ -1,3 +1,51 @@
 #!/bin/sh -f
 
-wget http://abacus.gene.ucl.ac.uk/software/indelible/EFBKqHdv0v7qir6CyeHgqaz/INDELibleV1.03.tar.gz
+# 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 }'`
+
+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.]\+\) .*${NAME}.*?\1?"`
+    if echo "$VERSION" | grep -q "upstream-version" ; then
+        echo "Unable to parse version number"
+        exit
+    fi
+fi
+
+wget "http://abacus.gene.ucl.ac.uk/software/indelible/EFBKqHdv0v7qir6CyeHgqaz/INDELibleV${VERSION}.tar.gz"
+
+UPSTREAMTARBALL="INDELibleV${VERSION}.tar.gz"
+
+mkdir -p ../tarballs
+rm -rf ../tarballs/*
+
+OLDPWD=$PWD
+
+cd ../tarballs
+tar -xaf $OLDPWD/${UPSTREAMTARBALL}
+
+# Fix upstreams non-Gnu naming scheme
+TARDIR=${NAME}-${VERSION}
+UPSTREAMTARDIR=`find . -mindepth 1 -maxdepth 1 -type d`
+if [ "${UPSTREAMTARDIR}" != "${TARDIR}" ] ; then
+    mv "${UPSTREAMTARDIR}" "${TARDIR}"
+fi
+
+# Remove useless binaries
+rm -rf "${TARDIR}/bin"
+
+# rebuild package
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
+rm -rf ${TARDIR}
+
+mv "$NAME"_"$VERSION".orig.tar.${COMPRESS} ..

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/indelible.git



More information about the debian-med-commit mailing list