%define data_version 0.8.1 %define oversion %(echo %{version} | sed -e 's/\\.//g') %define gamelibdir %{_libdir}/games/%{name} Summary: An open-source content package for Quake III Arena Name: openarena Version: 0.8.1 Release: %{mkrel 1} Source0: http://openarena.ws/svn/source/%{oversion}/%{name}-engine-%{version}-1.tar.bz2 Source1: http://cheapy.deathmask.net/logo.gif License: GPLv2+ Group: Games/Arcade URL: http://openarena.ws/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: GL-devel BuildRequires: SDL-devel BuildRequires: openal-devel BuildRequires: oggvorbis-devel BuildRequires: imagemagick BuildRequires: %{name}-data = %{data_version} Requires: %{name}-data = %{data_version} %description OpenArena is an open-source content package for Quake III Arena licensed under the GPL, effectively creating a free stand-alone game. You do not need Quake III Arena to play this game. %prep %setup -q -n %{name}-engine-%{version} %build %make %install rm -rf %{buildroot} %make copyfiles COPYDIR=%{buildroot}%{gamelibdir} # symlink files from noarch package in arch-specific game dir ln -sf %{_gamesdatadir}/%{name}/baseoa/* %{buildroot}%{gamelibdir}/baseoa binary=`basename %{buildroot}%{gamelibdir}/openarena.*` install -d %{buildroot}%{_gamesbindir} cat > %{buildroot}%{_gamesbindir}/%{name} <<EOF #!/bin/sh cd %{gamelibdir} exec ./$binary \$* EOF chmod 755 %{buildroot}%{_gamesbindir}/%{name} mkdir -p %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48,64x64,128x128}/apps convert -scale 128x128 %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/128x128/apps/%{name}.png convert -scale 64x64 %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png convert -scale 48x48 %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png convert -scale 32x32 %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png convert -scale 16x16 %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png install -d %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Name=OpenArena Comment=Quake 3: Arena-like FPS game Exec=soundwrapper %{_gamesbindir}/%{name} Icon=%{name} Terminal=false Type=Application Categories=Game;ArcadeGame; EOF %clean rm -rf %{buildroot} %if %mdkversion < 200900 %post %update_menus %update_icon_cache hicolor %endif %if %mdkversion < 200900 %postun %clean_menus %clean_icon_cache hicolor %endif %pretrans if [ -L %{gamelibdir}/baseoa ]; then rm -f %{gamelibdir}/baseoa fi %files %defattr(-,root,root) %{_gamesbindir}/%{name} %dir %{gamelibdir} %{gamelibdir}/missionpack %{gamelibdir}/oa_ded.* %{gamelibdir}/openarena.* %dir %{gamelibdir}/baseoa %{gamelibdir}/baseoa/*.pk3 %{_iconsdir}/hicolor/*/apps/%{name}.png %{_datadir}/applications/mandriva-%{name}.desktop %changelog * Sun Nov 09 2008 Adam Williamson <awilliamson@mandriva.com> 0.8.1-1mdv2009.1 + Revision: 301187 - fix icon directory creation - conditionalize %%post and %%postun - clean up menu entry - fd.o icons - correct license - drop serverfix.patch (merged upstream) - clean spec: + don't over-use pointless %%defines + consistent %%{buildroot} not $RPM_BUILD_ROOT + tabs not spaces - new release 0.8.1 * Sun Aug 31 2008 Funda Wang <fundawang@mandriva.org> 0.8.0-3mdv2009.0 + Revision: 277909 - add upstream fix for server hosting * Sat Aug 30 2008 Funda Wang <fundawang@mandriva.org> 0.8.0-2mdv2009.0 + Revision: 277575 - rebuild against new data package - fix binary name * Mon Aug 25 2008 Funda Wang <fundawang@mandriva.org> 0.8.0-1mdv2009.0 + Revision: 275746 - New version 0.8.0 * Mon Aug 04 2008 Funda Wang <fundawang@mandriva.org> 0.7.7-4mdv2009.0 + Revision: 263057 - bump version of data pacakage * Tue Jun 03 2008 Olivier Blin <oblin@mandriva.com> 0.7.7-3mdv2009.0 + Revision: 214681 - run update/clean menus * Thu May 29 2008 Olivier Blin <oblin@mandriva.com> 0.7.7-2mdv2009.0 + Revision: 212923 - 0.7.7 * Wed Apr 23 2008 Olivier Blin <oblin@mandriva.com> 0.7.6-2mdv2009.0 + Revision: 196719 - package pk3 symlinks - explicitely require data package with the same version binary version has been built with - symlink files from noarch package in arch-specific game dir - buildrequire data package * Tue Apr 22 2008 Olivier Blin <oblin@mandriva.com> 0.7.6-1mdv2009.0 + Revision: 196656 - explicitely list subdirs in lib - do not use a symlink anymore for baseoa directory (it now contains the binary files, can't point to /usr/share) - remove builtin include file - 0.7.6 * Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 0.7.0-3mdv2008.1 + Revision: 136634 - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated' * Mon Jul 16 2007 Olivier Blin <oblin@mandriva.com> 0.7.0-3mdv2008.0 + Revision: 52357 - convert baseoa directory as symlink before installation (#31885) * Fri Jul 13 2007 Olivier Blin <oblin@mandriva.com> 0.7.0-2mdv2008.0 + Revision: 51693 - buildrequire oggvorbis-devel - require openarena-data and symlink data files in libdir - fix build by copying ui/menudef.h from upstream SVN - 0.7.0 (source tarball does not contain data files anymore) * Wed Jan 03 2007 Olivier Blin <oblin@mandriva.com> 0.6.0-2mdv2007.0 + Revision: 103935 - fix wrapper script (thanks misc for spotting that) * Mon Dec 04 2006 Olivier Blin <oblin@mandriva.com> 0.6.0-1mdv2007.1 + Revision: 90544 - buildrequire GL-devel - initial OpenArena release - Create openarena