[libgeotiff-epsg] 17/28: Add get-orig-source target to create the upstream tarball.
Bas Couwenberg
sebastic at xs4all.nl
Tue Nov 25 20:11:17 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository libgeotiff-epsg.
commit 6bb5a51d5db785db78f0b78172fa904aefce2f9e
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Nov 15 16:35:34 2014 +0100
Add get-orig-source target to create the upstream tarball.
---
debian/changelog | 6 +++++
debian/get-orig-source | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++
debian/rules | 6 +++++
debian/watch | 4 ++++
4 files changed, 75 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 048c049..dc52c00 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libgeotiff-epsg (1.4.0-2) UNRELEASED; urgency=medium
+
+ * Add get-orig-source target to create the upstream tarball.
+
+ -- Francesco Paolo Lovergine <frankie at debian.org> Sat, 15 Nov 2014 16:35:14 +0100
+
libgeotiff-epsg (1.4.0-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..07d979e
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+set -e
+
+COMPRESS=xz
+
+NAME=libgeotiff
+PACKAGE=${NAME}-epsg
+
+DEBIANDIR=$(readlink -f $(dirname $0))
+PACKAGEDIR=$(readlink -f $(dirname ${DEBIANDIR}))
+PARENTDIR=$(readlink -f $(dirname ${PACKAGEDIR}))
+
+WATCHFILE=${DEBIANDIR}/watch
+
+VERSION=$(uscan --watchfile ${WATCHFILE} --report | grep "Newest version on remote site is" | awk -F, '{print $1}' | awk '{print $7}')
+if [ -z $VERSION ]; then
+ echo "Error: No upstream version"
+ exit 1
+fi
+
+TMPDIR=$(mktemp -d)
+
+TARDIR=${PACKAGE}-${VERSION}
+TARFILE=${NAME}-${VERSION}.tar.gz
+
+# Download latest upstream tarball to temp dir
+uscan --watchfile ${WATCHFILE} --download-version ${VERSION} --destdir ${TMPDIR}
+
+cd ${TMPDIR}
+
+if [ ! -e "${TARFILE}" ]; then
+ echo "Error: Tarball not found: ${TARFILE}"
+ exit 1
+fi
+
+rm -rf ${TARDIR}
+
+tar -xaf ${TARFILE}
+
+UPSTREAMTARDIR=`find . -mindepth 1 -maxdepth 1 -type d`
+if [ "${UPSTREAMTARDIR}" != "${TARDIR}" ] ; then
+ mv "${UPSTREAMTARDIR}" "${TARDIR}"
+fi
+
+# Remove everything except the csv directory
+find ${TARDIR} -mindepth 1 -maxdepth 1 -not -name csv -exec rm -rf {} \;
+
+ORIGTARFILE="${PACKAGE}_${VERSION}.orig.tar.${COMPRESS}"
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf ${ORIGTARFILE} "${TARDIR}"
+
+mv ${ORIGTARFILE} ${PARENTDIR}
+
+rm -rf ${TARDIR}
+cd -
+rm -rf ${TMPDIR}
+
+exit 0
diff --git a/debian/rules b/debian/rules
index 9d523b5..855e9bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,9 +8,15 @@
dh $@
override_dh_auto_configure:
+ # No need to configure
override_dh_auto_build:
+ # No need to build
override_dh_auto_install:
install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/epsg_csv
install -o root -g root -m 600 csv/*.csv $(CURDIR)/debian/tmp/usr/share/epsg_csv/.
+
+get-orig-source:
+ . debian/get-orig-source
+
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..6b0d2b3
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# Compulsory line, this is a version 3 file
+version=3
+http://download.osgeo.org/geotiff/libgeotiff/ \
+libgeotiff-([\d\.]+)\.tar\.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/libgeotiff-epsg.git
More information about the Pkg-grass-devel
mailing list