Blob Blame History Raw
%global shortname flare
Name:       flare-engine
Version:    0.19
Release:    2%{?dist}
Summary:    A single player, 2D-isometric, action Role-Playing Engine
License:    GPLv3+
URL:        http://www.flarerpg.org
Source0:    http://downloads.sourceforge.net/project/flare-game/Linux/%{name}.%{version}.tar.gz

# Corrected manpage section:
# https://github.com/clintbellanger/flare-engine/commit/2b4409f4f28abf7ee78007c436be548c27dcf60d
Patch0:     %{name}-manpagefix.patch
# Upstream refuses to provide this itself
Patch1:     %{name}-use-system-gfx.patch
# See:
# https://github.com/clintbellanger/flare-engine/pull/1133
Patch2:     %{name}-allow-environment-to-override-flags.patch

Requires:   liberation-sans-fonts

BuildRequires:  cmake
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 engine only.

%prep
%setup -q -n %{name}.%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1

# Remove scripts that are not needed in installation
rm -f mods/*/languages/xgettext.py*
rm -f mods/default/languages/regenerate_po.sh


%build
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBINDIR="bin" -DDATADIR="share/%{shortname}/" .
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}

# Use system font
find %{buildroot}%{_datadir}/%{shortname}/ -name "*.ttf" -delete
ln -s %{_datadir}/fonts/liberation/LiberationSans-Regular.ttf %{buildroot}%{_datadir}/%{shortname}/default/mods/default/fonts/LiberationSans-Regular.ttf


%files
%doc COPYING README.engine CREDITS.txt RELEASE_NOTES.txt
%{_bindir}/%{shortname}
%{_datadir}/%{shortname}/
%{_mandir}/man6/%{shortname}.6*


%changelog
* Wed Jul 30 2014 Erik Schilling <ablu.erikschilling@googlemail.com> - 0.19-2
- Actually apply system gfx patch
- Disallow the project to override environment compiler flags
- Delete bundeled ttf and use symlink
- Added missing mail address to changelog

* Sat Mar 01 2014 Erik Schilling <ablu.erikschilling@googlemail.com> - 0.19-1
- Seperated out engine into a seperate package like upstream did
- Previously this engine was part of the flare package