File tsc.spec of Package tsc

#
# spec file for package tsc
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           tsc
Version:        2.0.0
Release:        1.1
Summary:        Secret Maryo Chronicles
License:        GPL-3.0
Group:          Amusements/Games/Arcade
Url:            http://www.secretmaryo.org
Source0:        TSC-cegui-0.8.tar.bz2
Source1:        %{name}.desktop
# PATCH-FIX-UPSTREAM smc-boost-filesystem3.patch dimstar@opensuse.org -- Fix buld with boost 1.46, patch taken from the Forum, by upstream auth.
#Patch0:         smc-boost-filesystem3.patch
#Patch1:         smc-1.9-fix-implicit-linking.patch
#Patch2:         smc-fixes-for-cegui-v0-7.diff
BuildRequires:  DevIL-devel
BuildRequires:  Mesa-devel
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_ttf-devel
BuildRequires:  bison
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  glew-devel
BuildRequires:  gperf
BuildRequires:  libcegui-devel
BuildRequires:  libxml++-devel
BuildRequires:  pcre-devel
BuildRequires:  pkgconfig
BuildRequires:  ruby-devel
BuildRequires:  unzip
BuildRequires:  update-desktop-files
#BuildRequires:  pkgconfig(cegui-opengl >= 0.5.0)
BuildRequires:  pkgconfig(libpng)
#Recommends:     smc-music-addon
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Secret Maryo Chronicles is an Open Source two-dimensional platform game
with a style designed similar to classic sidescroller games.
It uses the platform independent library SDL and, since version 0.98,
the OpenGL accelerated Graphics Renderer. The game is developed in C++.

%prep
%setup -q -n TSC-cegui-0.8
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1

cd smc

# Licenses to shared libraries, available in their own packages
rm -fr docs/licenses
sed -i 's/\r//' docs/*.*
%__chmod 644 docs/*.*

%build
cd smc
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
#LIBS=-lboost_system
make %{?_smp_mflags} VERBOSE=1

%install
%makeinstall
%__install -d -m 755 %{buildroot}%{_datadir}/applications
%__install -d -m 755 %{buildroot}%{_datadir}/pixmaps
%__install -d -m 755 %{buildroot}%{_mandir}/man6
%__install -m 644 data/icon/window_32.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%__install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name} Games ArcadeGame
%fdupes -s %{buildroot}
#%find_lang 'Secret Maryo Chronicles' %{name}

# -f %{name}.lang

%files
%defattr(-,root,root)
%doc docs/*
%{_bindir}/smc
%{_datadir}/smc
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by