From 1a7bf664163f5dc1dfd3471f8a10f502e636bdcb Mon Sep 17 00:00:00 2001
From: Erik Schilling <ablu.erikschilling@googlemail.com>
Date: Sat, 1 Mar 2014 18:06:45 +0100
Subject: [PATCH] Updated to 0.19 release, split out engine code

Engine was splitted to flare-engine
---
 flare-desktop-file-fix.patch |  31 +++++++
 flare-font-replace.patch     |  59 ++++++++-----
 flare-system-sdl-gfx.patch   | 119 +++++++++++++-------------
 flare-utf8-fix.patch         |  34 --------
 flare.spec                   | 198 +++++++++++++++++--------------------------
 5 files changed, 206 insertions(+), 235 deletions(-)
 create mode 100644 flare-desktop-file-fix.patch
 delete mode 100644 flare-utf8-fix.patch

diff --git a/flare-desktop-file-fix.patch b/flare-desktop-file-fix.patch
new file mode 100644
index 0000000..d68d76a
--- /dev/null
+++ b/flare-desktop-file-fix.patch
@@ -0,0 +1,31 @@
+From e35fba9f4cb44eb491cf3fbe31245db75d7e313c Mon Sep 17 00:00:00 2001
+From: Erik Schilling <ablu.erikschilling@googlemail.com>
+Date: Mon, 24 Feb 2014 22:51:16 +0100
+Subject: [PATCH] Fixed Exec section in desktop file
+
+According to
+http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
+the = is not allowed. It also did not work for me when i tested it. It
+works this way now.
+---
+ distribution/flare.desktop.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/distribution/flare.desktop.in b/distribution/flare.desktop.in
+index 12bd9d8..2ea6ca1 100644
+--- a/distribution/flare.desktop.in
++++ b/distribution/flare.desktop.in
+@@ -14,8 +14,8 @@ Comment[fr]=Un jeu de rôle d'action monojoueur en 2D isométrique
+ Comment[gl]=Xogo individual de acción e rol cunha vista isométrica en dúas dimensións.
+ Comment[ru]=Изометрический ролевой боевик для одного игрока
+ Comment[uk]=Ізометричний рольовий екшн (Action/RPG) для одного гравця
+-TryExec=@FLARE_EXECUTABLE_PATH@ --game=flare-game
+-Exec=@FLARE_EXECUTABLE_PATH@ --game=flare-game
++TryExec=@FLARE_EXECUTABLE_PATH@ "--game=flare-game"
++Exec=@FLARE_EXECUTABLE_PATH@ "--game=flare-game"
+ Categories=Game;RolePlaying;
+ Icon=flare
+ Terminal=false
+-- 
+1.8.5.3
+
diff --git a/flare-font-replace.patch b/flare-font-replace.patch
index 2313372..a56eb15 100644
--- a/flare-font-replace.patch
+++ b/flare-font-replace.patch
@@ -1,26 +1,45 @@
-From 7a46d20c2cac27c14f1a60c99ee2b8ef57861273 Mon Sep 17 00:00:00 2001
+From 96b99aa286154fbd62aaf96fc9c2d49c5641d10d Mon Sep 17 00:00:00 2001
 From: Erik Schilling <ablu.erikschilling@googlemail.com>
-Date: Mon, 1 Apr 2013 11:56:29 +0200
-Subject: [PATCH 2/2] Changed unifont to DejaVu since Fedora does not have
- unifont packaged
+Date: Mon, 24 Feb 2014 22:23:30 +0100
+Subject: [PATCH] Replaced unifont with dejavu
 
 ---
- mods/fantasycore/engine/languages.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ mods/fantasycore/engine/font_settings.txt | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
 
-diff --git a/mods/fantasycore/engine/languages.txt b/mods/fantasycore/engine/languages.txt
-index 7f6af9c..051dc32 100644
---- a/mods/fantasycore/engine/languages.txt
-+++ b/mods/fantasycore/engine/languages.txt
-@@ -8,7 +8,7 @@ fi=Suomi
- fr=Français
- gl=Galego
- it=Italiano
--ja=Nihongo
-+ja=Nihongo,DejaVuSans.ttf,12
- nb=Norsk Bokmål
- nl=Nederlands
- pl=Polski
+diff --git a/mods/fantasycore/engine/font_settings.txt b/mods/fantasycore/engine/font_settings.txt
+index 431bc78..493ac3a 100644
+--- a/mods/fantasycore/engine/font_settings.txt
++++ b/mods/fantasycore/engine/font_settings.txt
+@@ -3,20 +3,20 @@
+ 
+ [font_regular]
+ default=LiberationSans-Regular.ttf,12,1
+-ja=unifont-6.3.ttf,12,1
+-zh=unifont-6.3.ttf,12,1
++ja=DejaVuSans.ttf,12,1
++zh=DejaVuSans.ttf,12,1
+ 
+ [font_bold]
+ default=LiberationSans-Bold.ttf,12,1
+-ja=unifont-6.3.ttf,12,1
+-zh=unifont-6.3.ttf,12,1
++ja=DejaVuSans.ttf,12,1
++zh=DejaVuSans.ttf,12,1
+ 
+ [font_italic]
+ default=LiberationSans-Italic.ttf,12,1
+-ja=unifont-6.3.ttf,12,1
+-zh=unifont-6.3.ttf,12,1
++ja=DejaVuSans.ttf,12,1
++zh=DejaVuSans.ttf,12,1
+ 
+ [font_captions]
+ default=LiberationSans-Regular.ttf,24,1
+-ja=unifont-6.3.ttf,24,1
+-zh=unifont-6.3.ttf,12,1
++ja=DejaVuSans.ttf,24,1
++zh=DejaVuSans.ttf,24,1
 -- 
-1.8.1.4
+1.8.5.3
 
diff --git a/flare-system-sdl-gfx.patch b/flare-system-sdl-gfx.patch
index d67719e..b65b4de 100644
--- a/flare-system-sdl-gfx.patch
+++ b/flare-system-sdl-gfx.patch
@@ -1,16 +1,16 @@
-From cea2271f6610dd56ed02369e5805337010d16689 Mon Sep 17 00:00:00 2001
+From f0fa04f071e985bc6a9e134e2f32dc2a2abf9d7e Mon Sep 17 00:00:00 2001
 From: Erik Schilling <ablu.erikschilling@googlemail.com>
 Date: Mon, 1 Apr 2013 11:55:58 +0200
-Subject: [PATCH 1/2] Use system SDL_gfx
+Subject: [PATCH] Use system SDL_gfx
 
 ---
  CMakeLists.txt          |  12 +-
  FindSDL_gfx.cmake       |  40 +++
- src/Avatar.cpp          |   2 +-
+ src/Avatar.cpp          |   2 +
  src/FontEngine.cpp      |   2 +-
  src/GameStateLoad.cpp   |   2 +-
  src/SDL_gfxBlitFunc.c   | 639 ------------------------------------------------
- src/SDL_gfxBlitFunc.h   | 167 -------------
+ src/SDL_gfxBlitFunc.h   | 166 -------------
  src/WidgetButton.cpp    |   2 +-
  src/WidgetCheckBox.cpp  |   2 +-
  src/WidgetInput.cpp     |   2 +-
@@ -19,16 +19,16 @@ Subject: [PATCH 1/2] Use system SDL_gfx
  src/WidgetScrollBar.cpp |   2 +-
  src/WidgetScrollBox.cpp |   2 +-
  src/WidgetSlider.cpp    |   2 +-
- 15 files changed, 61 insertions(+), 819 deletions(-)
+ 15 files changed, 62 insertions(+), 817 deletions(-)
  create mode 100644 FindSDL_gfx.cmake
  delete mode 100644 src/SDL_gfxBlitFunc.c
  delete mode 100644 src/SDL_gfxBlitFunc.h
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 40f52ca..68d9f9a 100644
+index ef6577f..40355fe 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -49,6 +49,8 @@ EndIf(NOT IS_ABSOLUTE "${DATADIR}")
+@@ -48,6 +48,8 @@ EndIf(NOT IS_ABSOLUTE "${DATADIR}")
  
  # Detect missing dependencies
  
@@ -37,7 +37,7 @@ index 40f52ca..68d9f9a 100644
  Find_Package (SDL REQUIRED)
  If (NOT SDL_FOUND)
    Message (FATAL_ERROR "Couldn't find SDL development files. On Debian-based systems (such as Ubuntu) you should install the 'libsdl1.2-dev' package.")
-@@ -77,6 +79,13 @@ Else (NOT SDLTTF_FOUND)
+@@ -76,6 +78,13 @@ Else (NOT SDLTTF_FOUND)
    Include_Directories (${SDLTTF_INCLUDE_DIR})
  EndIf (NOT SDLTTF_FOUND)
  
@@ -51,15 +51,15 @@ index 40f52ca..68d9f9a 100644
  
  # Sources
  
-@@ -141,7 +150,6 @@ Set (FLARE_SOURCES
+@@ -145,7 +154,6 @@ Set (FLARE_SOURCES
  	./src/PowerManager.cpp
  	./src/QuestLog.cpp
  	./src/SaveLoad.cpp
 -	./src/SDL_gfxBlitFunc.c
  	./src/Settings.cpp
+ 	./src/SharedGameResources.cpp
  	./src/SharedResources.cpp
- 	./src/StatBlock.cpp
-@@ -180,7 +188,7 @@ If (NOT SDLMAIN_LIBRARY)
+@@ -188,7 +196,7 @@ If (NOT SDLMAIN_LIBRARY)
    Set (SDLMAIN_LIBRARY "")
  EndIf (NOT SDLMAIN_LIBRARY)
  
@@ -67,7 +67,7 @@ index 40f52ca..68d9f9a 100644
 +Target_Link_Libraries (flare ${CMAKE_LD_FLAGS} ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY} ${SDLMAIN_LIBRARY} ${SDLGFX_LIBRARIES})
  
  
- # desktop file
+ # installing to the proper places
 diff --git a/FindSDL_gfx.cmake b/FindSDL_gfx.cmake
 new file mode 100644
 index 0000000..1125751
@@ -115,33 +115,33 @@ index 0000000..1125751
 +    MESSAGE(FATAL_ERROR "Could NOT find SDL_gfx library ${SDLGFX_INCLUDE_DIR}")
 +ENDIF (NOT SDLGFX_FOUND AND SDL_gfx_FIND_REQUIRED)
 diff --git a/src/Avatar.cpp b/src/Avatar.cpp
-index 6303e87..60e2190 100644
+index f0538ba..bdd3763 100644
 --- a/src/Avatar.cpp
 +++ b/src/Avatar.cpp
-@@ -25,7 +25,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+@@ -24,6 +24,8 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+  * Contains logic and rendering routines for the player avatar.
   */
  
- 
--#include "SDL_gfxBlitFunc.h"
++
 +#include <SDL_gfxBlitFunc.h>
  #include "Animation.h"
  #include "AnimationManager.h"
  #include "AnimationSet.h"
 diff --git a/src/FontEngine.cpp b/src/FontEngine.cpp
-index f153210..6427527 100644
+index d76a3e0..b6ccbc0 100644
 --- a/src/FontEngine.cpp
 +++ b/src/FontEngine.cpp
-@@ -19,7 +19,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
-  * class FontEngine
+@@ -20,7 +20,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
   */
  
+ #include "CommonIncludes.h"
 -#include "SDL_gfxBlitFunc.h"
 +#include <SDL_gfxBlitFunc.h>
  #include "FontEngine.h"
  #include "FileParser.h"
  #include "SharedResources.h"
 diff --git a/src/GameStateLoad.cpp b/src/GameStateLoad.cpp
-index 5683d34..774ecd5 100644
+index 927eb67..7bdc6b3 100644
 --- a/src/GameStateLoad.cpp
 +++ b/src/GameStateLoad.cpp
 @@ -20,7 +20,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
@@ -800,10 +800,10 @@ index 96cbd2f..0000000
 -}
 diff --git a/src/SDL_gfxBlitFunc.h b/src/SDL_gfxBlitFunc.h
 deleted file mode 100644
-index 3603a3c..0000000
+index cd3f6c2..0000000
 --- a/src/SDL_gfxBlitFunc.h
 +++ /dev/null
-@@ -1,167 +0,0 @@
+@@ -1,166 +0,0 @@
 -/*
 -
 -SDL_gfxBlitFunc.h: custom blitters
@@ -833,7 +833,6 @@ index 3603a3c..0000000
 -
 -*/
 -
--
 -#pragma once
 -#ifndef _SDL_gfxBlitFunc_h
 -#define _SDL_gfxBlitFunc_h
@@ -972,33 +971,33 @@ index 3603a3c..0000000
 -
 -#endif /* _SDL_gfxBlitFunc_h */
 diff --git a/src/WidgetButton.cpp b/src/WidgetButton.cpp
-index 7d53c2d..603f2d8 100644
+index 40f86bd..a7ae5b6 100644
 --- a/src/WidgetButton.cpp
 +++ b/src/WidgetButton.cpp
-@@ -22,7 +22,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+@@ -20,7 +20,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+  * class WidgetButton
+  */
  
- #include "WidgetButton.h"
- #include "SharedResources.h"
 -#include "SDL_gfxBlitFunc.h"
 +#include <SDL_gfxBlitFunc.h>
- 
- using namespace std;
- 
+ #include "SharedResources.h"
+ #include "WidgetButton.h"
+ #include "WidgetTooltip.h"
 diff --git a/src/WidgetCheckBox.cpp b/src/WidgetCheckBox.cpp
-index d817441..f94300d 100644
+index a96ab89..d522ec5 100644
 --- a/src/WidgetCheckBox.cpp
 +++ b/src/WidgetCheckBox.cpp
-@@ -28,7 +28,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
- #include "Widget.h"
- #include "WidgetCheckBox.h"
- #include "SharedResources.h"
+@@ -21,7 +21,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+  */
+ 
+ #include "CommonIncludes.h"
 -#include "SDL_gfxBlitFunc.h"
 +#include <SDL_gfxBlitFunc.h>
- 
- using namespace std;
- 
+ #include "SharedResources.h"
+ #include "WidgetCheckBox.h"
+ #include "Widget.h"
 diff --git a/src/WidgetInput.cpp b/src/WidgetInput.cpp
-index a7ef910..aff1f60 100644
+index 4647955..c0e88ea 100644
 --- a/src/WidgetInput.cpp
 +++ b/src/WidgetInput.cpp
 @@ -19,7 +19,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
@@ -1011,7 +1010,7 @@ index a7ef910..aff1f60 100644
  using namespace std;
  
 diff --git a/src/WidgetLabel.cpp b/src/WidgetLabel.cpp
-index b1bfda9..235057c 100644
+index 2c96570..bb6d5ff 100644
 --- a/src/WidgetLabel.cpp
 +++ b/src/WidgetLabel.cpp
 @@ -23,7 +23,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
@@ -1024,20 +1023,20 @@ index b1bfda9..235057c 100644
  
  using namespace std;
 diff --git a/src/WidgetListBox.cpp b/src/WidgetListBox.cpp
-index 2516022..af0c6e5 100644
+index 04f5a45..36d16df 100644
 --- a/src/WidgetListBox.cpp
 +++ b/src/WidgetListBox.cpp
-@@ -22,7 +22,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+@@ -20,7 +20,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+  * class WidgetListBox
+  */
  
- #include "WidgetListBox.h"
- #include "SharedResources.h"
 -#include "SDL_gfxBlitFunc.h"
 +#include <SDL_gfxBlitFunc.h>
- 
- using namespace std;
- 
+ #include "SharedResources.h"
+ #include "WidgetLabel.h"
+ #include "WidgetListBox.h"
 diff --git a/src/WidgetScrollBar.cpp b/src/WidgetScrollBar.cpp
-index c1d6443..0251dbb 100644
+index 8dabbcd..857df7e 100644
 --- a/src/WidgetScrollBar.cpp
 +++ b/src/WidgetScrollBar.cpp
 @@ -22,7 +22,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
@@ -1050,12 +1049,12 @@ index c1d6443..0251dbb 100644
  using namespace std;
  
 diff --git a/src/WidgetScrollBox.cpp b/src/WidgetScrollBox.cpp
-index 8c83d37..8db40c4 100644
+index bce70de..b9261cf 100644
 --- a/src/WidgetScrollBox.cpp
 +++ b/src/WidgetScrollBox.cpp
-@@ -21,7 +21,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
-  */
+@@ -22,7 +22,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
  
+ #include "Settings.h"
  #include "WidgetScrollBox.h"
 -#include "SDL_gfxBlitFunc.h"
 +#include <SDL_gfxBlitFunc.h>
@@ -1063,18 +1062,18 @@ index 8c83d37..8db40c4 100644
  using namespace std;
  
 diff --git a/src/WidgetSlider.cpp b/src/WidgetSlider.cpp
-index 07d19e2..9bdbabb 100644
+index 49c29f2..00efc32 100644
 --- a/src/WidgetSlider.cpp
 +++ b/src/WidgetSlider.cpp
-@@ -29,7 +29,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
- #include "WidgetSlider.h"
- #include "SharedResources.h"
- #include "UtilsDebug.h"
+@@ -20,7 +20,7 @@ FLARE.  If not, see http://www.gnu.org/licenses/
+  */
+ 
+ #include "CommonIncludes.h"
 -#include "SDL_gfxBlitFunc.h"
 +#include <SDL_gfxBlitFunc.h>
- 
- using namespace std;
- 
+ #include "SharedResources.h"
+ #include "UtilsDebug.h"
+ #include "Widget.h"
 -- 
-1.8.1.4
+1.8.4.2
 
diff --git a/flare-utf8-fix.patch b/flare-utf8-fix.patch
deleted file mode 100644
index 9248323..0000000
--- a/flare-utf8-fix.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2ec78a6d2fc6e88af0595e4cec6b6f1141c77fc0 Mon Sep 17 00:00:00 2001
-From: Erik Schilling <ablu.erikschilling@googlemail.com>
-Date: Mon, 1 Apr 2013 19:07:53 +0200
-Subject: [PATCH] Fixed utf8 in the CREDITS
-
----
- CREDITS.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CREDITS.txt b/CREDITS.txt
-index 8c4a4dc..bc70498 100644
---- a/CREDITS.txt
-+++ b/CREDITS.txt
-@@ -89,7 +89,7 @@ Translations
- (de) German by Thomas 'CruzR' Glamsch, Chris Oelmueller, and Stefan Beller
- (el) Greek by Yannis Anthymidis
- (es) Spanish by Juan Pablo 'morris989' Tamayo and Carlos Sanchez
--(fi) Finnish by Timo Siev�nen
-+(fi) Finnish by Timo Sievänen
- (fr) French by Quentin 'acieroid' Stievenart, Bonbadil, Morgan Strauss, and Christoph J. Thompson
- (gl) Galacian by Adrian Chaves Fernandez (Gallaecio)
- (it) Italian by Giovanni Dalla Torre and Andrea Ranaldi
-@@ -98,7 +98,7 @@ Translations
- (nl) Dutch by Bas Doodeman
- (pl) Polish by Pawel Puszczynski
- (ru) Russian by Sergey Basalaev and Evgen Pavlov
--(sk) Slovak by Miro J�no��k
-+(sk) Slovak by Miro Jánoík
- (sv) Swedish by Andreas Berheim Brudin
- (uk) Ukrainian by Igor Paliychuk
- 
--- 
-1.8.1.4
-
diff --git a/flare.spec b/flare.spec
index e526325..774efe9 100644
--- a/flare.spec
+++ b/flare.spec
@@ -1,55 +1,27 @@
 Name:       flare
-Version:    0.18
-Release:    2%{?dist}
+Version:    0.19
+Release:    1%{?dist}
 Summary:    A single player, 2D-isometric, action Role-Playing Game
-License:    GPLv3+
+License:    CC-BY-SA and CC-BY and CC0 and Public Domain
 URL:        http://www.flarerpg.org
-Source0:    http://downloads.sourceforge.net/project/%{name}-game/%{name}-%{version}.tar.gz
-Source1:    %{name}.6
+Source0:    http://downloads.sourceforge.net/project/%{name}-game/Linux/%{name}-game.%{version}.tar.gz
 
 # 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
-# See https://github.com/clintbellanger/flare-game/pull/286
-Patch2:     %{name}-utf8-fix.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.
+# Desktop file was broken in release
+Patch1:     %{name}-desktop-file-fix.patch
 
-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.
+Requires:   %{name}-engine%{?_isa} = %{version}-%{release}
+Requires:   dejavu-sans-fonts
+Requires:   liberation-sans-fonts
 
-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++.
+Obsoletes:   %{name}-data <= 0.18
 
-This package contains the binary. 
+BuildRequires:  desktop-file-utils
 
-%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
+%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
@@ -59,46 +31,41 @@ 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
+Flare uses simple file formats (INI style configuration 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
+%setup -q -n %{name}-game.%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
-# Remove scripts that is not needed in installation
-rm -f mods/*/languages/xgettext.py*
-# This is an odd script/readme hybrid
-# It is only required for updating the translations, so I will remove it too
+# Remove scripts that are not needed in installation
 rm -f mods/*/languages/readme.txt
+rm -f mods/*/languages/xgettext.py*
+
+# Remove .DS_Store files
+find -name "*.DS_Store" -delete
 
-# Empty file in this release
-rm mods/fantasycore/items/sets.txt
+# Other unclean leftovers
+rm -f mods/fantasycore/engine/._xp_table.txt
+
+# Empty file in release (rpmlint bugs about it)
+rm -f mods/fantasycore/items/sets.txt
 
 %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
+rm -f %{buildroot}%{_datadir}/%{name}/%{name}-game/mods/fantasycore/fonts/*
+ln -s %{_datadir}/fonts/dejavu/DejaVuSans.ttf %{buildroot}%{_datadir}/%{name}/%{name}-game/mods/fantasycore/fonts/DejaVuSans.ttf
+ln -s %{_datadir}/fonts/liberation/LiberationSans-Bold.ttf %{buildroot}%{_datadir}/%{name}/%{name}-game/mods/fantasycore/fonts/LiberationSans-Bold.ttf
+ln -s %{_datadir}/fonts/liberation/LiberationSans-Italic.ttf %{buildroot}%{_datadir}/%{name}/%{name}-game/mods/fantasycore/fonts/LiberationSans-Italic.ttf
+ln -s %{_datadir}/fonts/liberation/LiberationSans-Regular.ttf %{buildroot}%{_datadir}/%{name}/%{name}-game/mods/fantasycore/fonts/LiberationSans-Regular.ttf
 
 # Validate desktop file
 desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
@@ -116,72 +83,61 @@ fi
 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %files
-%doc COPYING README CREDITS.txt RELEASE_NOTES.txt
-%{_bindir}/%{name}
+%doc README CREDITS.txt RELEASE_NOTES.txt
 %{_datadir}/applications/%{name}.desktop
 %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
-%{_mandir}/man6/%{name}.6*
 
-%files data
+# only language folder starts with 'l'
+%{_datadir}/%{name}/%%{name}-game/mods/*/[!l]*
+%{_datadir}/%{name}/%{name}-game/mods/mods.txt
+# grab info files about locales too
+%{_datadir}/%{name}/%{name}-game/mods/*/languages/*[!o]
+
+%dir %{_datadir}/%{name}/%{name}-game/
+%dir %{_datadir}/%{name}/%{name}-game/mods/*/
+%dir %{_datadir}/%{name}/%{name}-game/mods/*/languages/
+
 # LOCALES:
 # For updating (replace %% with single one):
-# find -name "*.po"| sed 's/^.\(.*[a-z]\+\.\)\(..\)\.po/%%lang(\2) %%{_datadir}\/%%{name}\1\2.po/'
-%lang(sv) %{_datadir}/%{name}/mods/alpha_demo/languages/data.sv.po
-%lang(gl) %{_datadir}/%{name}/mods/alpha_demo/languages/data.gl.po
-%lang(fi) %{_datadir}/%{name}/mods/alpha_demo/languages/data.fi.po
-%lang(pl) %{_datadir}/%{name}/mods/alpha_demo/languages/data.pl.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(nb) %{_datadir}/%{name}/mods/alpha_demo/languages/data.nb.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(cs) %{_datadir}/%{name}/mods/alpha_demo/languages/data.cs.po
-%lang(it) %{_datadir}/%{name}/mods/alpha_demo/languages/data.it.po
-%lang(sv) %{_datadir}/%{name}/mods/fantasycore/languages/data.sv.po
-%lang(gl) %{_datadir}/%{name}/mods/fantasycore/languages/data.gl.po
-%lang(fi) %{_datadir}/%{name}/mods/fantasycore/languages/data.fi.po
-%lang(pl) %{_datadir}/%{name}/mods/fantasycore/languages/data.pl.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(nb) %{_datadir}/%{name}/mods/fantasycore/languages/data.nb.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(cs) %{_datadir}/%{name}/mods/fantasycore/languages/data.cs.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(pl) %{_datadir}/%{name}/mods/default/languages/engine.pl.po
-%lang(it) %{_datadir}/%{name}/mods/default/languages/engine.it.po
-%lang(en) %{_datadir}/%{name}/mods/default/languages/engine.en.po
-%lang(el) %{_datadir}/%{name}/mods/default/languages/engine.el.po
-%lang(nb) %{_datadir}/%{name}/mods/default/languages/engine.nb.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
-%lang(cs) %{_datadir}/%{name}/mods/default/languages/engine.cs.po
+# find -name "*.po" | sed 's/^.\(.*[a-z]\+\.\)\(..\)\.po/%%lang(\2) %%{_datadir}\/%%{name}\/%%{name}-game\1\2.po/' | sort
+%lang(cs) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.cs.po
+%lang(cs) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.cs.po
+%lang(de) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.de.po
+%lang(de) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.de.po
+%lang(el) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.el.po
+%lang(el) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.el.po
+%lang(fi) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.fi.po
+%lang(fi) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.fi.po
+%lang(fr) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.fr.po
+%lang(fr) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.fr.po
+%lang(gd) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.gd.po
+%lang(gd) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.gd.po
+%lang(gl) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.gl.po
+%lang(gl) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.gl.po
+%lang(it) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.it.po
+%lang(it) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.it.po
+%lang(ja) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.ja.po
+%lang(ja) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.ja.po
+%lang(nb) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.nb.po
+%lang(nb) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.nb.po
+%lang(nl) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.nl.po
+%lang(nl) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.nl.po
+%lang(pl) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.pl.po
+%lang(pl) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.pl.po
+%lang(ru) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.ru.po
+%lang(ru) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.ru.po
+%lang(sv) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.sv.po
+%lang(sv) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.sv.po
+%lang(uk) %{_datadir}/%{name}/%{name}-game/mods/alpha_demo/languages/data.uk.po
+%lang(uk) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.uk.po
+%lang(zh) %{_datadir}/%{name}/%{name}-game/mods/fantasycore/languages/data.zh.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
+* Sat Mar 01 2014 Erik Schilling <ablu.erikschilling@googlemail.com> 0.19-1
+- New release
+- Splitted out engine code into flare-engine package
+
 * Mon Apr 1 2013 Erik Schilling <ablu.erikschilling@googlemail.com> 0.18-2
 - Adapted to the newly updated release tar
 - Since the old one was kind of broken and incomplete a new one was generated
-- 
1.8.5.3

