[sumwars] Initial import (#801092)

Martin Preisler mpreisle at fedoraproject.org
Mon Mar 19 13:09:02 UTC 2012


commit 0e2ac90a0b963786f5eae4de636340313aa2c119
Author: Martin Preisler <mpreisle at redhat.com>
Date:   Mon Mar 19 13:56:44 2012 +0100

    Initial import (#801092)

 .gitignore      |    1 +
 sources         |    1 +
 sumwars.desktop |   10 ++++
 sumwars.spec    |  142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 154 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f9d6c66 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sumwars-0.5.6-src.tar.bz2
diff --git a/sources b/sources
index e69de29..da35526 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+89f53fe1023072785e039bdef312a04b  sumwars-0.5.6-src.tar.bz2
diff --git a/sumwars.desktop b/sumwars.desktop
new file mode 100644
index 0000000..8e9f91b
--- /dev/null
+++ b/sumwars.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=Summoning Wars
+GenericName=Summoning Wars
+Comment=A multi-player, 3D Action Role-Playing Game
+Exec=sumwars
+Categories=Game;RolePlaying;
+Icon=sumwars
+Terminal=false
+
diff --git a/sumwars.spec b/sumwars.spec
new file mode 100644
index 0000000..5d68bd7
--- /dev/null
+++ b/sumwars.spec
@@ -0,0 +1,142 @@
+Name:           sumwars
+Version:        0.5.6
+Release:        5%{?dist}
+Summary:        Hack and slash top-down view RPG game
+Group:          Amusements/Games
+
+# Also includes "nlfg" networking layer licensed as MIT,
+# the effective license of GPLv3+ and MIT is GPLv3+
+License:        GPLv3+
+URL:            http://sumwars.org
+Source0:        http://sourceforge.net/projects/sumwars/files/%{version}/%{name}-%{version}-src.tar.bz2
+Source1:        sumwars.desktop
+
+BuildRequires:  gettext, cmake, ogre-devel, cegui-devel, ois-devel, lua-devel,
+BuildRequires:  libXrandr-devel, desktop-file-utils
+BuildRequires:  freealut-devel, libogg-devel, libvorbis-devel, physfs-devel
+BuildRequires:  tinyxml-devel, enet-devel
+
+# runtime plugin, doesn't get picked up automatically
+Requires:       cegui-libxml-xmlparser
+Requires:       %{name}-data = %{version}
+
+%description
+Summoning Wars is an open source role-playing game, featuring both
+a single-player and a multiplayer mode for about 2 to 8 players. 
+
+%package data
+Summary:        %{summary}
+Group:          Amusements/Games
+Requires:       %{name} = %{version}
+BuildArch:      noarch
+License:        CC-BY-SA
+
+Requires:       dejavu-sans-fonts, dejavu-serif-fonts
+
+%description data
+This package contains the data files for Summoning Wars.
+
+%prep
+%setup -q
+
+# http://sumwars.org/mantis/view.php?id=63
+for file in AUTHORS; do
+   sed 's|\r||' $file > $file.tmp
+   iconv -f ISO-8859-1 -t UTF8 $file.tmp > $file.tmp2
+   touch -r $file $file.tmp2
+   mv -f $file.tmp2 $file
+done
+
+rm -rf src/enet
+rm -rf src/tinyxml
+rm -rf tools/*
+
+%build
+# we don't build developer tools into the application as users won't need that
+# do not use the bundled TinyXML, use the system one
+# do not use the bundled enet, use the system one
+
+%cmake -DSUMWARS_BUILD_TOOLS:BOOL=OFF -DSUMWARS_NO_TINYXML:BOOL=ON -DSUMWARS_NO_ENET:BOOL=ON
+
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# remove bundled but unused OgreCore.zip
+rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/packs/OgreCore.zip
+
+# use system-wide dejavu sans and serif fonts
+rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts/DejaVuSans.ttf
+ln -s /%{_datadir}/fonts/dejavu/DejaVuSans.ttf \
+        $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts
+rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts/DejaVuSerif.ttf
+ln -s /%{_datadir}/fonts/dejavu/DejaVuSerif.ttf \
+        $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts
+
+# upstream doesn't want to install .desktop file and icons because distros
+# keep them at different locations, lets install both manually
+
+for i in 16 24 32 48 64 128
+do
+    install -D "share/icon/SumWarsIcon_${i}x${i}.png" \
+        "$RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png"
+done
+
+desktop-file-install --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
+                     --mode="0644" \
+                     %{SOURCE1}
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%files
+%doc COPYING AUTHORS README
+%{_bindir}/%{name}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
+%dir %{_datadir}/%{name}/translation/
+%lang(de) %{_datadir}/%{name}/translation/de/
+%lang(en) %{_datadir}/%{name}/translation/en/
+%lang(it) %{_datadir}/%{name}/translation/it/
+%lang(pl) %{_datadir}/%{name}/translation/pl/
+%lang(pt) %{_datadir}/%{name}/translation/pt/
+%lang(ru) %{_datadir}/%{name}/translation/ru/
+%lang(uk) %{_datadir}/%{name}/translation/uk/
+
+%files data
+%dir %{_datadir}/%{name}/
+%{_datadir}/%{name}/data/
+%{_datadir}/%{name}/resources/
+
+%changelog
+* Mon Mar 19 2012 Martin Preisler <mpreisle at redhat.com> 0.5.6-5
+- removed rm -rf $RPM_BUILD_ROOT from %%install
+- moved icons and desktop file back to the base package
+
+* Fri Mar 16 2012 Martin Preisler <mpreisle at redhat.com> 0.5.6-4
+- ensure consistent usage of %%{name}
+- use 80 characters per line where possible
+
+* Wed Mar 14 2012 Martin Preisler <mpreisle at redhat.com> 0.5.6-3
+- separate License fields for main package and the data subpackage
+- moved dejavu font Requires to data
+
+* Wed Mar 14 2012 Martin Preisler <mpreisle at redhat.com> 0.5.6-2
+- use system TinyXML and enet
+- remove unused OgreCore.zip
+- desktop file reworked
+- use system dejavu-{sans,serif}
+
+* Wed Mar 07 2012 Martin Preisler <mpreisle at redhat.com> 0.5.6-1
+- new package
+


More information about the scm-commits mailing list