From 95803a4102f3e19c1d32cb10f7e0bdaa4b53f953 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Feb 28 2012 19:17:46 +0000 Subject: Handle upstream switch to git. --- diff --git a/nazghul-make-snapshot b/nazghul-make-snapshot index 46605b7..c01e198 100755 --- a/nazghul-make-snapshot +++ b/nazghul-make-snapshot @@ -1,10 +1,26 @@ -#!/bin/sh -CVSDATE=$1 +#!/bin/bash -x +DATE=$(date +%Y%m%d) TMPDIR=$(mktemp -d nazghul.XXXXXXXXXXX) || exit 1 pushd $TMPDIR -cvs -z3 -d:pserver:anonymous@nazghul.cvs.sourceforge.net:/cvsroot/nazghul co -D$CVSDATE nazghul -find nazghul -name CVS -type d -exec 'rm -rf {} \\\;' -tar cvvfJ nazghul-$CVSDATE.txz nazghul +git clone --depth 1 git://nazghul.git.sourceforge.net/gitroot/nazghul/nazghul +pushd nazghul +REV=$(git rev-parse --short HEAD) +VERSTR=${DATE}git${REV} +NAME=nazghul-${VERSTR}.txz +rm -rf .git popd -mv $TMPDIR/nazghul-$CVSDATE.txz . +tar cvvfJ $NAME nazghul +popd +mv $TMPDIR/$NAME . rm -rf $TMPDIR +echo +echo "Exported revision $REV" + +R=$(grep Release: nazghul.spec|sed -e 's/Release:\s*//' -e 's/\..*//') +echo $R + +NEWREV="$(($R + 1)).${VERSTR}" + +sed -i -e "s/Release:.*/Release: ${NEWREV}%{?dist}/" \ + -e "s/Source0:.*/Source0: $NAME/" \ + nazghul.spec diff --git a/nazghul.spec b/nazghul.spec index 01f488a..6f196a4 100644 --- a/nazghul.spec +++ b/nazghul.spec @@ -1,7 +1,6 @@ -%define cvsdate 20120104 Name: nazghul Version: 0.7.1 -Release: 1.%{cvsdate}cvs%{?dist} +Release: 2.20120228gitb0a402a%{?dist} Summary: A computer role-playing game (CRPG) engine License: GPLv2+ @@ -11,11 +10,11 @@ Group: Amusements/Games # Occasionally upstream names things with an underscore. %define version_us %(echo %{version} | sed -e 's/\\./_/g') -#Source0: http://dl.sourceforge.net/nazghul/nazghul-%{version}.tar.gz +#Source0: nazghul-20120228gitb0a402a.txz # Construct cvs checkout tarball with: # ./nazghul-make-snapshot %{cvsdate} -Source0: nazghul-%{cvsdate}.txz +Source0: nazghul-20120228gitb0a402a.txz Source1: haxima-music-license Patch0: nazghul-desktop.patch @@ -99,6 +98,10 @@ install -D -m 644 icons/haxima.png %{buildroot}/%{_datadir}/pixmaps/haxima.png %changelog +* Tue Feb 28 2012 Jason L Tibbitts III - 0.7.1-2.20120228gitb0a402a +- Upstream switched to git. +- Update to latest snapshot. + * Wed Feb 01 2012 Jason L Tibbitts III - 0.7.1-1.20120104cvs - The package version actually incremented between the previous snapshot and this one, so update to reflect that. There have been no upstream changes