[med-svn] [kmer-tools] 02/02: Add script for get-orig-source and the corresponding rule

Afif Elghraoui afif-guest at moszumanska.debian.org
Wed May 6 06:03:38 UTC 2015


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

afif-guest pushed a commit to branch master
in repository kmer-tools.

commit d50d042252f980d48565542187947b8075a55d1e
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Tue May 5 23:02:25 2015 -0700

    Add script for get-orig-source and the corresponding rule
    
    The script is based on the one Andreas made for Mauve. However,
    it still needs some modification to properly set the version since
    kmer does not have versioned releases.
---
 debian/get-orig-source | 33 +++++++++++++++++++++++++++++++++
 debian/rules           |  3 +++
 2 files changed, 36 insertions(+)

diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..8940b91
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,33 @@
+#!/bin/sh
+# get source for kmer from SVN because there is no source tarball distribution
+
+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
+
+SVNURI="svn://svn.code.sf.net/p/kmer/code/trunk"
+revision=`LANG=C svn info ${SVNURI} | grep "^Last Changed Rev:" | sed 's/Last Changed Rev: *//'`
+VERSION=`echo ${VERSION}| sed "s/+[0-9]\+$//"`+${revision}
+
+TARDIR=${NAME}-${VERSION}
+
+mkdir -p ../tarballs
+cd ../tarballs
+# svn export conserves time stamps of the files, checkout does not
+LC_ALL=C svn export ${SVNURI} ${TARDIR} >/dev/null 2>/dev/null
+
+cd ${TARDIR}
+rm -f *.pdf *.ppt
+cd ..
+
+tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.xz "${TARDIR}"
+rm -rf "${NAME}"-"$VERSION"
diff --git a/debian/rules b/debian/rules
index 2cd6e5a..873b17d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,3 +32,6 @@ override_dh_auto_build:
 override_dh_auto_clean:
 	$(MAKE) real-clean
 	rm -rf Linux-* installdir
+
+get-orig-source:
+	. debian/get-orig-source

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



More information about the debian-med-commit mailing list