[SCM] Positional Astronomy Library branch, master, updated. f1c441bd08c808c57684bbea7497127671f66648

Ole Streicher debian at liska.ath.cx
Thu Feb 9 10:24:36 UTC 2012


The following commit has been merged in the master branch:
commit f1c441bd08c808c57684bbea7497127671f66648
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Thu Feb 9 11:23:08 2012 +0100

    Put comments and MD5 verification into download script

diff --git a/debian/get-orig-source.sh b/debian/get-orig-source.sh
index 9043cdb..d12a09b 100755
--- a/debian/get-orig-source.sh
+++ b/debian/get-orig-source.sh
@@ -1,20 +1,53 @@
 #!/bin/sh
 
-trap 'rm -fr debian-orig-source || exit 1' EXIT INT TERM
+TMPDIR=$(mktemp --directory)
+trap "rm -fr ${TMPDIR} || exit 1" EXIT INT TERM
 
+#
+# Download and unpack the main source
+# This is the sub directory libraries/sla of the git repository
+#
 H=1e88f89e36f83c9370a1b088ab4e7e995519ea56
 SLA_URL="http://starlink.jach.hawaii.edu/git/?p=starlink.git;a=snapshot;h=${H};sf=tgz"
+wget -O ${TMPDIR}/slalib-git.tar.gz "${SLA_URL}"
+tar xf ${TMPDIR}/slalib-git.tar.gz -C ${TMPDIR}
+
+#
+# Download the starconf.m4 file needed for automake/autoconf
+# The original location is buildsupport/starconf/starcond.m4.in
+#
 STARCONF_URL="http://starlink.jach.hawaii.edu/git/?p=starlink.git;a=blob_plain;f=buildsupport/starconf/starconf.m4.in;h=c888aee37a39d2ea28b10138b97c34c324e519b8;hb=d6a0e974c8e2744e79450cf002c65d27d1336586"
-DATE="Thu, 2 Feb 2012 23:56:14 +0000"
+wget -O ${TMPDIR}/starlink/starconf.m4 "${STARCONF_URL}"
 
-mkdir debian-orig-source/
-wget -O debian-orig-source/tarball "${SLA_URL}"
-tar xf debian-orig-source/tarball -C debian-orig-source
-wget -O debian-orig-source/starlink/starconf.m4 "${STARCONF_URL}"
+#
+# Retrieve package version from the AC_INIT(sla, 2.5-5, ussc at star.rl.ac.uk)
+# line of configure.ac
+#
+VERSION=$(echo $(fgrep AC_INIT ${TMPDIR}/starlink/configure.ac |cut -d, -f2 | tr - .))
 
-VERSION=$(fgrep AC_INIT debian-orig-source/starlink/configure.ac| cut -d\  -f2 |cut -d, -f1 | tr - .)
-touch -d "${DATE}" debian-orig-source/starlink debian-orig-source/starlink/*
-mv debian-orig-source/starlink debian-orig-source/slalib_${VERSION}
-tar cf slalib_${VERSION}.orig.tar -C debian-orig-source slalib_${VERSION} 
+#
+# Touch all files with a specific (release) date to ensure that the 
+# MD5 checksum doesn't change.
+#
+DATE="Thu, 2 Feb 2012 23:56:14 +0000"
+touch -d "${DATE}" ${TMPDIR}/starlink ${TMPDIR}/starlink/*
+
+#
+# Repack everything into .orig.tar.gz
+#
+mv ${TMPDIR}/starlink ${TMPDIR}/slalib-${VERSION}
+tar cf slalib_${VERSION}.orig.tar -C ${TMPDIR} slalib-${VERSION} 
 gzip -n -9 -f slalib_${VERSION}.orig.tar
-md5sum slalib_${VERSION}.orig.tar.gz
+
+#
+# Check or print out the MD5 checksum
+#
+case ${VERSION} in
+    2.5.5)
+	echo "213b1ef21b623e8044d50bc122eb0a9f  slalib_2.5.5.orig.tar.gz" | \
+	md5sum -c -
+	;;
+    *)
+	md5sum slalib_${VERSION}.orig.tar.gz
+	;;
+esac

-- 
Positional Astronomy Library



More information about the debian-science-commits mailing list