Package list libkmlframework-java / 7e46ad3 debian / get-orig-source
7e46ad3

Tree @7e46ad3 (Download .tar.gz)

get-orig-source @7e46ad3raw · history · blame

#!/bin/sh -e
# if you need to repack for whatever reason you can
# use this script via uscan or directly
#
# FIXME: currently the code is not conform to Debian Policy
#        http://www.debian.org/doc/debian-policy/ch-source.html
#        "get-orig-source (optional)"
#        This target may be invoked in any directory, ...
# --> currently it is assumed the script is called in the
#     source directory featuring the debian/ dir

cat <<EOT
This used to work on googlecode but project was moved to
   https://github.com/deinlandel/kmlframework
and thus this script needs to be redesigned.  Since the
project is deprecated anyway this was not done for the moment
EOT
exit 1

COMPRESS=xz

NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`

VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`

## NO tags no branches
SVNURI="http://kmlframework.googlecode.com/svn/trunk"
SVNSRCURI="$SVNURI/src"
SVNDOCURI="$SVNURI/docs"
revision=`LANG=C svn info ${SVNURI} | grep "^Last Changed Rev:" | sed 's/Last Changed Rev: *//'`
VERSION=`echo ${VERSION}| sed "s/\.r[0-9]\+$//"`.r${revision}
echo $VERSION

TARDIR=${NAME}-${VERSION}

mkdir -p ../tarballs
cd ../tarballs
# svn export conserves time stamps of the files, checkout does not
rm -rf ${TARDIR}
mkdir -p ${TARDIR}
cd ${TARDIR}
LC_ALL=C svn --quiet export ${SVNSRCURI}
LC_ALL=C svn --quiet export ${SVNDOCURI}
cd ..

GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
rm -rf ${TARDIR}