rpms/colossus/devel colossus-gen-tarball.sh, NONE, 1.1 colossus-rev.xsl, NONE, 1.1 colossus.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Bruno Wolff III
bruno at fedoraproject.org
Mon Jul 13 03:00:34 UTC 2009
- Previous message (by thread): rpms/znc/devel import.log, NONE, 1.1 znc-0.070-pkgconfigdir.diff, NONE, 1.1 znc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/php-LightweightPicasaAPI/devel php-LightweightPicasaAPI.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bruno
Update of /cvs/pkgs/rpms/colossus/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25575/devel
Modified Files:
.cvsignore sources
Added Files:
colossus-gen-tarball.sh colossus-rev.xsl colossus.spec
import.log
Log Message:
* Sun Jul 12 2009 Bruno Wolff III <bruno at wolff.to> - 0-0.2.20090710svn4432
- A couple of final spec file tweaks based on comments from my sponsor
* Fri Jul 10 2009 Bruno Wolff III <bruno at wolff.to> - 0-0.1.20090710svn4432
- Prerelease snapshot with a public build expected in a week or two
--- NEW FILE colossus-gen-tarball.sh ---
#!/bin/sh
# Generate colossus source tarball in current directory
# The desired rev should be used as a parameter.
# If a rev isn't provided, the current rev of HEAD is determined and
# is used instead.
# $REV[0] is the date of the commit for the build
# $REV[1] is the revision of the commit for the build
# Location of SVN repository
COLOSSUS=https://colossus.svn.sourceforge.net/svnroot/colossus/trunk/Colossus
# First check if revision specified
if test -z "$1"
then
REV=(`svn info --xml --incremental $COLOSSUS | xsltproc colossus-rev.xsl -`)
else
REV=(`svn info -r $1 --xml --incremental $COLOSSUS | xsltproc colossus-rev.xsl -`)
fi
# Remove pre-existing source with the same rev
rm -rf colossus-${REV[0]}-${REV[1]}.tar.gz colossus-${REV[0]}-${REV[1]}
# Fetch source
svn export -q -r ${REV[1]} $COLOSSUS colossus-${REV[0]}-${REV[1]}
# Remove included jar files
find colossus-${REV[0]}-${REV[1]} -name '*.jar' | xargs rm -f
# Remove htdocs is just a copy of the project home page. This is also
# one less set of images to worry about.
rm -rf colossus-${REV[0]}-${REV[1]}/htdocs
# This can be used to remove all of the unused images in the icons directory.
# It is not needed for now.
# find colossus-${REV[0]}-${REV[1]}/core/src/main/resource/icons/ -type f \! -name ColossusIcon.png | xargs rm -f
# Build .tar.gz archive
tar czf colossus-${REV[0]}-${REV[1]}.tar.gz colossus-${REV[0]}-${REV[1]}
# Remove unarchived source
rm -rf colossus-${REV[0]}-${REV[1]}
--- NEW FILE colossus-rev.xsl ---
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="entry/commit">
<xsl:value-of select="format-number(date:year(date),'0000')"/>
<xsl:value-of select="format-number(date:month-in-year(date),'00')"/>
<xsl:value-of select="format-number(date:day-in-month(date),'00')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@revision"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
--- NEW FILE colossus.spec ---
Name: colossus
%define rev 4432
%define revdate 20090710
Version: 0
Release: 0.2.%{revdate}svn%{rev}%{?dist}
Summary: Allows people to play Titan against each other or AIs
Group: Amusements/Games
License: GPLv2
URL: http://colossus.sourceforge.net/
# The svn repo includes some prebuilt jar files that need to be removed
# The colossus-gen-tarball.sh can be used to fetch either the latest
# revision or a specified revision from the repo, strip the jar files
# and some artwork and then build a tar.gz archive.
# colossus-rev.xsl is used to extract the current revision of HEAD
# when grabbing the latest revision, using svn info.
# The repo is at:
# https://colossus.svn.sourceforge.net/svnroot/colossus/trunk/Colossus
Source0: colossus-%{revdate}-%{rev}.tar.gz
Source1: colossus-gen-tarball.sh
Source2: colossus-rev.xsl
%global with_gcj %{!?_without_gcj:1}%{?_without_gcj:0}
%if %{with_gcj}
BuildRequires: java-gcj-compat-devel >= 1.0.31
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
%else
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Note the intention is to eventually require only java 1.5 for both building
# and installing. But bug 510243 in gjdoc currently blocks this.
BuildRequires: java-devel >= 1.6
BuildRequires: jpackage-utils
BuildRequires: ant
BuildRequires: jdom
BuildRequires: desktop-file-utils
BuildRequires: zip
Requires: java >= 1.6
Requires: jpackage-utils
Requires: jdom
Requires(post): coreutils
Requires(postun): coreutils
%description
Colossus allows people to play Titan
(http://www.boardgamegeek.com/boardgame/103) and several Titan variants, hot
seat or via a network. Several different AIs are provided that can play instead
of humans.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{revdate}-%{rev}
%build
# Tell colossus' build process where to look for needed jar files
echo "libs.dir=%{_javadir}" > local_build.properties
# Tell colossus some build info that the game will display
mkdir -p build/ant/classes/META-INF
cat <<EOF > build/ant/classes/META-INF/build.properties
svn.revision.max-with-flags=%{rev}
build.timestamp=%{revdate}
username=rpmbuild
EOF
ant jar
# The supplied build.xml adds a classpath to the manifest that needs to
# be removed.
# First remove the existing manifest file
zip -d Colossus.jar META-INF/MANIFEST.MF
# Then put one back without a class path
cat <<EOF > fixup.xml
<?xml version="1.0"?>
<!-- Replace manifest with one without a classpath -->
<project name="Colossus" default="fixup" basedir=".">
<target name="fixup"
description="Remove classpath from manifest">
<jar jarfile="Colossus.jar" update="true">
<manifest>
<attribute name="Main-Class"
value="net.sf.colossus.appmain.Start" />
</manifest>
</jar>
</target>
</project>
EOF
ant -f fixup.xml
ant -lib %{_javadir}/jdom.jar javadoc
# Allow for simple command to run colossus
echo -e "#!/bin/sh\njava -cp %{_javadir}/jdom.jar:%{_javadir}/colossus.jar net.sf.colossus.appmain.Start" > %{name}
# Make a .desktop file
cat <<EOF > %{name}.desktop
[Desktop Entry]
Name=Colossus
GenericName=Strategy Game
Comment=Multiplayer turned based fantasy game with AIs available
Exec=%{name}
Icon=%{name}
Terminal=false
Type=Application
Categories=Game;StrategyGame;
EOF
%install
rm -rf $RPM_BUILD_ROOT
install -D -m 755 Colossus.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -D -m 644 core/src/main/resource/icons/ColossusIcon.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{name}.desktop
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
cp -rpv build/ant/javadoc $RPM_BUILD_ROOT%{_javadocdir}/%{name}
chmod -R og=u-w $RPM_BUILD_ROOT%{_javadocdir}
%if %{with_gcj}
%{_bindir}/aot-compile-rpm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if %{with_gcj}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
touch --no-create %{_datadir}/pixmaps || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/pixmaps || :
%postun
%if %{with_gcj}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
touch --no-create %{_datadir}/pixmaps || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/pixmaps || :
%files
%defattr(-,root,root,-)
%{_javadir}/*
%{_bindir}/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%doc docs/*
%if %{with_gcj}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
* Sun Jul 12 2009 Bruno Wolff III <bruno at wolff.to> - 0-0.2.20090710svn4432
- A couple of final spec file tweaks based on comments from my sponsor
* Fri Jul 10 2009 Bruno Wolff III <bruno at wolff.to> - 0-0.1.20090710svn4432
- Prerelease snapshot with a public build expected in a week or two
--- NEW FILE import.log ---
colossus-0-0_2_20090710svn4432_fc11:HEAD:colossus-0-0.2.20090710svn4432.fc11.src.rpm:1247453817
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/colossus/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 13 Jul 2009 02:41:05 -0000 1.1
+++ .cvsignore 13 Jul 2009 03:00:33 -0000 1.2
@@ -0,0 +1 @@
+colossus-20090710-4432.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/colossus/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 13 Jul 2009 02:41:06 -0000 1.1
+++ sources 13 Jul 2009 03:00:34 -0000 1.2
@@ -0,0 +1 @@
+4bc5d55868e775581d3ef8f281886059 colossus-20090710-4432.tar.gz
- Previous message (by thread): rpms/znc/devel import.log, NONE, 1.1 znc-0.070-pkgconfigdir.diff, NONE, 1.1 znc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/php-LightweightPicasaAPI/devel php-LightweightPicasaAPI.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list