File CorsixTH.spec of Package CorsixTH

# spec file for package CorsixTH
# Copyright (c) 2017 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

Name:           CorsixTH
Version:        0.61
Release:        0
Summary:        Theme Hospital clone
License:        MIT
Group:          Amusements/Games/Strategy/Other
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-devel
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavdevice)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libpostproc)
BuildRequires:  pkgconfig(libswresample)
BuildRequires:  pkgconfig(libswscale)
%if 0%{?suse_version} > 1320
BuildRequires:  pkgconfig(luajit)
BuildRequires:  lua51-luajit-devel
BuildRequires:  pkgconfig(sdl2)
Recommends:     timidity
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1210
BuildRequires:  lua51-devel
BuildRequires:  lua-devel
Requires:       lua51-LPeg
Requires:       lua51-luafilesystem

This project aims to reimplement the game engine of Theme Hospital, and be
able to load the original game data files. This means that you will need a
purchased copy of Theme Hospital, or a copy of the demo, in order to use
CorsixTH. After most of the original engine has been reimplemented in open
source code, the project will serve as a base from which extensions and
improvements to the original game can be made.

%setup -q

make %{?_smp_mflags}

pushd build
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}%{_bindir}
# create wrapper
cat <<EOF > %{buildroot}%{_bindir}/%{name}
cd %{_libdir}/%{name}
cd -
chmod +x %{buildroot}%{_bindir}/%{name}
# install icons and desktop file
mkdir %{buildroot}%{_datadir}
mkdir %{buildroot}%{_datadir}/pixmaps
mv %{buildroot}%{_libdir}/CorsixTH/CorsixTH.ico %{buildroot}%{_datadir}/pixmaps
install -p -m 644 CorsixTH/Original_Logo.svg %{buildroot}%{_datadir}/pixmaps/CorsixTH.svg
%suse_update_desktop_file -c CorsixTH CorsixTH "A Theme Hospital Clone" CorsixTH CorsixTH Game Simulation

%doc LICENSE.txt README.txt

openSUSE Build Service is sponsored by