diff options
author | B. Watson <yalhcru@gmail.com> | 2018-07-22 17:54:49 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-07-28 08:51:51 +0700 |
commit | 8b92a5519c9aa5e2ff99fb71693a8421b3e18c84 (patch) | |
tree | f078f078971ac984b9d4e1251600b451ae834b1e /network/gophernicus/git2tarxz.sh | |
parent | 25bfcdf5b3c4901efc46e24f10b2f28297056524 (diff) |
network/gophernicus: Updated for version 2.5v101, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'network/gophernicus/git2tarxz.sh')
-rw-r--r-- | network/gophernicus/git2tarxz.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/network/gophernicus/git2tarxz.sh b/network/gophernicus/git2tarxz.sh new file mode 100644 index 0000000000000..e4937ba1c4240 --- /dev/null +++ b/network/gophernicus/git2tarxz.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# Create source tarball from git repo, with generated version +# number. We don't include the git history in the tarball. + +# Note that this script doesn't need to be run as root. It does +# need to be able to write to the current directory it's run from. + +PRGNAM=gophernicus +CLONE_URL=https://github.com/kimholviala/$PRGNAM.git + +# Upstream stopped doing release tarballs, and switched to 'rolling +# release', which seems to be a euphemism for 'no releases, we are in +# perpetual alpha'. RELVER is the last release tarball. +RELVER=2.5 + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +# The 'rolling release' version numbers seem to increment with +# every commit. Upstream's got this script to generate them, so +# use it. +./git2changelog > ChangeLog +V=$( sed -n 's,.*\* (\(v[^)]*\).*,\1,p' ChangeLog | head -1 ) + +VERSION=${RELVER}${V} + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +cat <<EOF + +Archive created: $PRGNAM-$VERSION.tar.xz + +Update $PRGNAM.info with: + +VERSION="$VERSION" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/$PRGNAM-$VERSION.tar.xz" +MD5SUM="$( md5sum $PRGNAM-$VERSION.tar.xz | cut -d' ' -f1 )" + +Don't forget to upload the new source! +EOF |