[med-svn] [pcma] 06/10: Add get-orig-source target which considers date of files inside download tarball

Andreas Tille tille at debian.org
Mon Dec 18 13:03:47 UTC 2017


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

tille pushed a commit to branch master
in repository pcma.

commit 89eec15fe4fc4eb3242117b533d05507618d0b84
Author: Andreas Tille <tille at debian.org>
Date:   Mon Dec 18 13:58:14 2017 +0100

    Add get-orig-source target which considers date of files inside download tarball
---
 debian/changelog       |  4 +---
 debian/get-orig-source | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c29bad4..28894d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,5 @@
-pcma (2-1) UNRELEASED; urgency=low
+pcma (2.0+20040626-1) UNRELEASED; urgency=low
 
   * Initial release
-  Homepage and source code vanished, e-mail to authors has been
-  sent (Debian Med list in CC)
 
  -- Andreas Tille <tille at debian.org>  Thu, 24 May 2012 14:30:13 +0200
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..b479a89
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+COMPRESS=xz
+
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+DVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed -e 's/^[0-9]*://' -e 's/-.*//'`
+MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/^\([0-9\.]\+\)[+~][-0-9]\+$/\1/'`
+
+mkdir -p ../tarballs
+cd ../tarballs
+wget -q http://prodata.swmed.edu/download/pub/PCMA/pcma.tar.gz
+tar xaf ${NAME}.tar.gz
+VERSION=${MVERSION}+`find $NAME -type f -printf '%T@ %p\n' | sort -n | tail -1 | sed 's/ .*//' | gawk '{print strftime("%Y%m%d", $0)}'`
+
+if [ "$DVERSION" = "$VERSION" ] ; then
+  echo "No newer upstream version than $DVERSION available."
+  rm -rf ${NAME} ${NAME}.tar.gz
+  exit
+fi
+
+TARDIR=${NAME}-${VERSION}
+mv ${NAME} ${TARDIR}
+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/pcma.git



More information about the debian-med-commit mailing list