Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-backports-src > by-pkgid > 88c981e757abc295311c7b00a593374a > files > 5

corsixth-0.8-1mdv2010.2.src.rpm

###### Predefinitions #####
%define name		corsixth
%define oname		CorsixTH
%define version		0.8
%define beta		Beta8
%define release		%mkrel 1

##### Header #####
Summary:	Open source clone of Theme Hospital
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	http://corsix-th.googlecode.com/files/%{oname}-%{beta}-Source.tar.gz
Source2:	%{oname}-16.png
Source3:	%{oname}-32.png
Source4:	%{oname}-64.png
License:	MIT
Group:		Games/Strategy
URL:		http://code.google.com/p/corsix-th/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}

BuildRequires:	cmake 
BuildRequires:	SDL-devel
BuildRequires:	SDL_mixer-devel
BuildRequires:	lua-devel
Requires:	SDL lua

##### Description #####
%description
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 in order to use CorsixTH. 

Put those files found in directory which contains a file called HOSPITAL.EXE, 
sub-directories called DATA, LEVELS, and QDATA, and so on under 
'/usr/share/games/CorsixTH/th-files' directory. 

After most of the original engine has been reimplemented in open source code, 
the project will serve as a base from which extensions to the original game 
can be made just like OpenTTD. 

!! Please, please be aware that this is BETA release so many features are 
still missing or work in progress. Game configuration can be adjusted by 
changing values in /usr/share/games/CorsixTH/config.txt file !! 

##### setup, build, install #####
%prep
%setup -q -c

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

%build
cd %{oname}
%cmake .. -DCMAKE_INSTALL_PREFIX=%{_gamesdatadir}/
%make

%install
rm -rf %{buildroot}
cd %{oname}/build
make install DESTDIR=%{buildroot}/

mkdir %{buildroot}/%{_gamesbindir}
cat > %{buildroot}/%{_gamesbindir}/%{oname} << EOF
#!/bin/bash
%{_gamesdatadir}/%{oname}/%{oname}
EOF

mkdir %{buildroot}/%{_gamesdatadir}/%{oname}/th-files/

mkdir -p %{buildroot}/%{_iconsdir}/hicolor/{16x16,32x32,64x64,scalable}/apps
install -m 644 %{SOURCE2} %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{oname}.png
install -m 644 %{SOURCE3} %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{oname}.png
install -m 644 %{SOURCE4} %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{oname}.png

mkdir -p %{buildroot}/%{_datadir}/applications
cat > %{buildroot}/%{_datadir}/applications/mandriva-%{name}.desktop << EOF
[Desktop Entry]
Name=CorsixTH
Comment=Open source clone of Theme Hospital game
Exec=%{_gamesbindir}/%{oname}
Path=%{_gamesdatadir}/%{oname}
Icon=%{oname}
Terminal=false
Type=Application
Categories=Game;StrategyGame;
EOF

%clean
rm -rf %{buildroot}

##### Files #####
%files
%defattr(-,root,root)
%attr(755, root, root) %{_gamesbindir}/%{oname}
%dir %{_gamesdatadir}/%{oname}
%{_gamesdatadir}/%{oname}/*
%doc %{_gamesdatadir}/%{oname}/LICENSE.txt
%{_iconsdir}/hicolor/*/apps/%{oname}.*
%{_datadir}/applications/mandriva-%{name}.desktop



%changelog
* Wed Oct 05 2011 Andrey Bondrov <abondrov@mandriva.org> 0.8-1mdv2010.1
+ Revision: 703075
- New version: 0.8 (aka Beta8)

* Sun Jun 26 2011 Tomas Kindl <supp@mandriva.org> 0.7-1
+ Revision: 687297
- update to beta7 release

* Sat Mar 26 2011 Tomas Kindl <supp@mandriva.org> 0.6-1
+ Revision: 648588
- update to Beta6

* Wed Dec 29 2010 Tomas Kindl <supp@mandriva.org> 0.5-1mdv2011.0
+ Revision: 625871
- update to Beta5

* Mon Aug 09 2010 Tomas Kindl <supp@mandriva.org> 0.3-1mdv2011.0
+ Revision: 568272
- bump to official beta3

* Sun May 09 2010 Emmanuel Andry <eandry@mandriva.org> 0.2-3mdv2010.1
+ Revision: 544249
- fix files encoding
- fix lowercase/upercase data files issue with p0

* Sun May 09 2010 Tomas Kindl <supp@mandriva.org> 0.2-2mdv2010.1
+ Revision: 544106
- CorsixTH can be now run even from console...

* Wed Apr 07 2010 Tomas Kindl <supp@mandriva.org> 0.2-1mdv2010.1
+ Revision: 532457
- compilation and SPEC fixes
- update to official Beta2

* Fri Mar 19 2010 Tomas Kindl <supp@mandriva.org> 0.1-0.svn529.1mdv2010.1
+ Revision: 525173
- fix svn revision in spec
- update to latest SVN, fixing many outstanding issues (it's still beta!)
  minor SPEC cleanups
- minor spec file cleanup
- bump to latest SVN version
- SPEC file cleanup
- corsix-th initial upload
- create corsixth