[med-svn] [freeshim] 06/09: Obtain source from Github

Andreas Tille tille at debian.org
Wed Dec 27 23:20:51 UTC 2017


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

tille pushed a commit to branch master
in repository freeshim.

commit 6b596dea883c42fdeb5c371428c3ef4df692b198
Author: Andreas Tille <tille at debian.org>
Date:   Thu Dec 28 00:18:57 2017 +0100

    Obtain source from Github
---
 debian/get-orig-source | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..51d43bf
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+COMPRESS=xz
+
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/^\([0-9\.]\+\)[+~][-0-9]\+$/\1/'`
+
+mkdir -p ../tarballs
+cd ../tarballs
+# need to clean up the tarballs dir first because upstream tarball might
+# contain a directory with unpredictable name
+rm -rf *
+git clone --quiet https://github.com/freemed/freeshim
+cd $NAME
+VERSION=${MVERSION}+`date -d @$(git show --format="%at" | head -n1) +%Y%m%d`
+# for esthetical reasons set file timestamps (if git-restore-mtime is installed)
+git restore-mtime || true
+cd ..
+TARDIR=${NAME}-${VERSION}
+mv ${NAME} ${TARDIR}
+rm -rf ${TARDIR}/.git
+rm -f ${TARDIR}/jars/*
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
+rm -rf ${TARDIR}

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



More information about the debian-med-commit mailing list