%define name corsixth %define oname CorsixTH %define version 0.01b Summary: Open source clone of Theme Hospital Name: %{name} Version: %{version} Release: %mkrel 2 Source0: http://corsix-th.googlecode.com/files/%{oname}-%{version}-Source.tar.gz License: MIT Group: Games/Strategy URL: http://code.google.com/p/corsix-th/ Epoch: 1 BuildRequires: cmake BuildRequires: SDL-devel BuildRequires: SDL_mixer-devel BuildRequires: lua5.1-devel BuildRequires: freetype2-devel BuildRequires: icoutils Requires: TiMidity++ %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. %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 %cmake -DCMAKE_INSTALL_PREFIX=%{_gamesdatadir}/ %make %install cd 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/{32x32,128x128,256x256}/apps cd .. icotool -x %{oname}/%{oname}.ico mv %{oname}*32x32*.png %{oname}.png install -m 644 %{oname}.png %buildroot%_iconsdir/hicolor/32x32/apps/%{oname}.png mv %{oname}*128x128*.png %{oname}.png install -m 644 %{oname}.png %buildroot%_iconsdir/hicolor/128x128/apps/%{oname}.png mv %{oname}*256x256*.png %{oname}.png install -m 644 %{oname}.png %buildroot%_iconsdir/hicolor/256x256/apps/%{oname}.png mkdir -p %{buildroot}/%{_datadir}/applications cat > %{buildroot}/%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF [Desktop Entry] Name=CorsixTH Comment=Open source clone of Theme Hospital game Exec=%{oname} Path=%{_gamesdatadir}/%{oname} Icon=%{oname} Terminal=false Type=Application Categories=Game;StrategyGame; EOF %files %attr(755, root, root) %{_gamesbindir}/%{oname} %dir %{_gamesdatadir}/%{oname} %{_gamesdatadir}/%{oname}/* %doc %{_gamesdatadir}/%{oname}/LICENSE.txt %{_iconsdir}/hicolor/*/apps/%{oname}.* %{_datadir}/applications/%{_real_vendor}-%{name}.desktop %changelog * Mon Jun 25 2012 dams <dams> 1:0.01b-2.mga1 + Revision: 263553 - remove 'how to use' from 'description' - final version 0.01b - fix not working game - fix copyright on previous icon - update require to enable sound while playing * Mon Apr 25 2011 wally <wally> 0.6-2.mga1 + Revision: 90308 - fix desktop file name (mga#954) - drop buildroot definition * Sun Mar 27 2011 supp <supp> 0.6-1.mga1 + Revision: 78013 - imported package corsixth