[med-svn] [kmer-tools] 03/13: Simplify get-orig-source script
Afif Elghraoui
afif-guest at moszumanska.debian.org
Sat Jan 2 07:24:09 UTC 2016
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 3b02fbc091a91be1f4d0f85fca44b0ec4110737e
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Fri Jan 1 20:04:48 2016 -0800
Simplify get-orig-source script
---
debian/get-orig-source | 32 +++++---------------------------
debian/rules | 2 +-
2 files changed, 6 insertions(+), 28 deletions(-)
diff --git a/debian/get-orig-source b/debian/get-orig-source
index e49bf10..55d7b58 100755
--- a/debian/get-orig-source
+++ b/debian/get-orig-source
@@ -2,32 +2,10 @@
# 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
+base_url=http://sourceforge.net/code-snapshots/svn/k/km/kmer/code
+revision=$(echo ${DEB_VERSION_UPSTREAM} | grep --only-matching '[0-9]*$')
+snapshot=kmer-code-${revision}-trunk.zip
-SVNURI="svn://svn.code.sf.net/p/kmer/code/trunk"
-revision=`echo ${VERSION} | sed "s/^.*+//"`
-
-TARDIR=${NAME}-${VERSION}
-
-mkdir -p ../tarballs
-cd ../tarballs
-# svn export conserves time stamps of the files, checkout does not
-svn export -r ${revision} ${SVNURI} ${TARDIR} >/dev/null 2>/dev/null
-
-cd ${TARDIR}
-#rm -f *.pdf *.ppt
-rm -rf libutil/kazlib
-cd ..
-
-tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.xz "${TARDIR}"
-rm -rf "${NAME}"-"$VERSION"
+wget ${base_url}/${snapshot} -O ../${snapshot}
+mk-origtargz ../${snapshot} --rename --repack
diff --git a/debian/rules b/debian/rules
index 6e1315e..63d2482 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,4 +29,4 @@ override_dh_auto_clean:
rm -rf $(shell uname)-* installdir
get-orig-source:
- . debian/get-orig-source
+ DEB_VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM) 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