Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > edf546db69a7f374254b4cf350188f82 > files > 4

flare-0.17.1-8.fc16.src.rpm

%global tarversion v017_1

Name:       flare
Version:    0.17.1
Release:    8%{?dist}
Summary:    A single player, 2D-isometric, action Role-Playing Game
License:    GPLv3+
URL:        http://www.flarerpg.org
Source0:    https://github.com/downloads/clintbellanger/%{name}-game/%{name}_linux_%{tarversion}.tar.gz
Source1:    %{name}.6

# unifont is not packaged in Fedora. So I use Dejavu.
Patch0:     %{name}-font-replace.patch
# Makes it possible to build against system SDL_gfx.
# Upstream does not want to do cmake option to do this
# so we need to do it manually :(
Patch1:     %{name}-system-sdl-gfx.patch

Requires:       %{name}-data = %{version}-%{release}

BuildRequires:  cmake
BuildRequires:  desktop-file-utils
BuildRequires:  SDL_gfx-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_ttf-devel

%description
Flare (Free Libre Action Roleplaying Engine) is a simple game engine built to
handle a very specific kind of game: single-player 2D action RPGs. Flare is not
a re-implementation of an existing game or engine. It is a tribute to and
exploration of the action RPG genre.

Rather than building a very abstract, robust game engine, the goal of this
project is to build several real games and harvest an engine from the common,
reusable code. The first game, in progress, is a fantasy dungeon crawl.

Flare uses simple file formats (INI style config files) for most of the game
data, allowing anyone to easily modify game contents. Open formats are
preferred (png, ogg). The game code is C++.

This package contains the binary. 

%package data
Summary:    A single player, 2D-isometric, action Role-Playing Game, data files
License:    CC-BY-SA and CC-BY and CC0 and Public Domain
Requires:   %{name} = %{version}-%{release}
Requires:   dejavu-sans-fonts
Requires:   liberation-sans-fonts
BuildArch:  noarch

%description data
Flare (Free Libre Action Roleplaying Engine) is a simple game engine built to
handle a very specific kind of game: single-player 2D action RPGs. Flare is not
a re-implementation of an existing game or engine. It is a tribute to and
exploration of the action RPG genre.

Rather than building a very abstract, robust game engine, the goal of this
project is to build several real games and harvest an engine from the common,
reusable code. The first game, in progress, is a fantasy dungeon crawl.

Flare uses simple file formats (INI style config files) for most of the game
data, allowing anyone to easily modify game contents. Open formats are
preferred (png, ogg). The game code is C++.

This package contains the game data. 

%prep
%setup -q -n %{name}_%{tarversion}
%patch0 -p1
%patch1 -p1

# Fix permissions in tarball:
find . -type f | xargs chmod 644

%build
# Do not use /usr/games or /usr/share/games/
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBINDIR="bin" -DDATADIR="share/%{name}/" .
make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}

install -D -p -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man6/%{name}.6

# Use system font
rm -f %{buildroot}%{_datadir}/%{name}/mods/default/fonts/*
rm -f %{buildroot}%{_datadir}/%{name}/mods/fantasycore/fonts/*
ln -s %{_datadir}/fonts/dejavu/DejaVuSans.ttf %{buildroot}%{_datadir}/%{name}/mods/fantasycore/fonts/DejaVuSans.ttf
ln -s %{_datadir}/fonts/liberation/LiberationSans-Bold.ttf %{buildroot}%{_datadir}/%{name}/mods/fantasycore/fonts/LiberationSans-Bold.ttf
ln -s %{_datadir}/fonts/liberation/LiberationSans-Italic.ttf %{buildroot}%{_datadir}/%{name}/mods/fantasycore/fonts/LiberationSans-Italic.ttf
ln -s %{_datadir}/fonts/liberation/LiberationSans-Regular.ttf %{buildroot}%{_datadir}/%{name}/mods/default/fonts/LiberationSans-Regular.ttf
ln -s %{_datadir}/fonts/liberation/LiberationSans-Regular.ttf %{buildroot}%{_datadir}/%{name}/mods/fantasycore/fonts/LiberationSans-Regular.ttf

# Remove script that is not needed in installation
rm -f %{buildroot}/%{_datadir}/%{name}/mods/fantasycore/languages/xgettext.py

# Validate desktop file
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

%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 README credits.html
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man6/%{name}.6*

%files data
# LOCALES:
# For updating (replace %% with single one):
# find -name "*.po"| sed 's/^.\(.*[a-z]\+\.\)\(..\)\.po/%%lang(\2) %%{_datadir}\/%%{name}\1\2.po/'
%lang(gl) %{_datadir}/%{name}/mods/alpha_demo/languages/data.gl.po
%lang(fi) %{_datadir}/%{name}/mods/alpha_demo/languages/data.fi.po
%lang(de) %{_datadir}/%{name}/mods/alpha_demo/languages/data.de.po
%lang(ru) %{_datadir}/%{name}/mods/alpha_demo/languages/data.ru.po
%lang(ja) %{_datadir}/%{name}/mods/alpha_demo/languages/data.ja.po
%lang(nl) %{_datadir}/%{name}/mods/alpha_demo/languages/data.nl.po
%lang(fr) %{_datadir}/%{name}/mods/alpha_demo/languages/data.fr.po
%lang(uk) %{_datadir}/%{name}/mods/alpha_demo/languages/data.uk.po
%lang(it) %{_datadir}/%{name}/mods/alpha_demo/languages/data.it.po
%lang(gl) %{_datadir}/%{name}/mods/fantasycore/languages/data.gl.po
%lang(fi) %{_datadir}/%{name}/mods/fantasycore/languages/data.fi.po
%lang(de) %{_datadir}/%{name}/mods/fantasycore/languages/data.de.po
%lang(ru) %{_datadir}/%{name}/mods/fantasycore/languages/data.ru.po
%lang(ja) %{_datadir}/%{name}/mods/fantasycore/languages/data.ja.po
%lang(nl) %{_datadir}/%{name}/mods/fantasycore/languages/data.nl.po
%lang(fr) %{_datadir}/%{name}/mods/fantasycore/languages/data.fr.po
%lang(uk) %{_datadir}/%{name}/mods/fantasycore/languages/data.uk.po
%lang(it) %{_datadir}/%{name}/mods/fantasycore/languages/data.it.po
%lang(sk) %{_datadir}/%{name}/mods/default/languages/engine.sk.po
%lang(be) %{_datadir}/%{name}/mods/default/languages/engine.be.po
%lang(sv) %{_datadir}/%{name}/mods/default/languages/engine.sv.po
%lang(it) %{_datadir}/%{name}/mods/default/languages/engine.it.po
%lang(el) %{_datadir}/%{name}/mods/default/languages/engine.el.po
%lang(gl) %{_datadir}/%{name}/mods/default/languages/engine.gl.po
%lang(es) %{_datadir}/%{name}/mods/default/languages/engine.es.po
%lang(ja) %{_datadir}/%{name}/mods/default/languages/engine.ja.po
%lang(ru) %{_datadir}/%{name}/mods/default/languages/engine.ru.po
%lang(nl) %{_datadir}/%{name}/mods/default/languages/engine.nl.po
%lang(fi) %{_datadir}/%{name}/mods/default/languages/engine.fi.po
%lang(fr) %{_datadir}/%{name}/mods/default/languages/engine.fr.po
%lang(de) %{_datadir}/%{name}/mods/default/languages/engine.de.po
%lang(uk) %{_datadir}/%{name}/mods/default/languages/engine.uk.po

# only language folder starts with 'l'
%{_datadir}/%{name}/mods/*/[!l]*
%{_datadir}/%{name}/mods/mods.txt
# grab info files about locales too
%{_datadir}/%{name}/mods/*/languages/*[!o]
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/mods
%dir %{_datadir}/%{name}/mods/*/
%dir %{_datadir}/%{name}/mods/*/languages

%changelog
* Tue Nov 13 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-8
- Simplified directiory permissions
* Mon Nov 12 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-7
- Fixed directory ownership
* Sun Nov 11 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-6
- Spell-fix: reimplementation --> re-implementation
- Mark translation files with %%lang
* Fri Nov 02 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-5
- Dropped / between path makros
- Made use of %%{name} makro in Source1
- Made sure that the binary links against system SDL_gfx parts
- Replaced unifont use with dejavu since the font was not packaged
* Thu Oct 25 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-4
- Fixed require of binaries in -data package
- Fixed update icon cache
- Fixed trailing slash of url
- Fixed license from GPLv3 to GPLv3+
* Sat Oct 6 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-3
- Do not install to /usr/share/games but /usr/share (https://fedoraproject.org/wiki/SIGs/Games/Packaging)
* Sat Oct 6 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-2
- Added BuildArch: noarch for data package
* Fri Oct 5 2012 Erik Schilling <ablu.erikschilling@googlemail.com> 0.17.1-1
- Initial packaging