Name: sdlmame Version: 0.140u1 %define sversion %(sed -r -e "s/\\.//" -e "s/(.*)u(.)/\\1/" <<<%{version}) %define uversion %(sed -r -e "s/(.*u)(.)/\\2/;t;c\\0" <<<%{version}) %define distsuffix plf Release: %mkrel 1 Summary: SDL MAME is an arcade emulator License: Freeware Group: Emulators URL: http://mamedev.org/ #http://mamedev.org/downloader.php?&file=mame%{sversion}s.zip Source0: mame%{sversion}s.zip Source1: sdlmame-wrapper Source2: sdlmame-extra.tar.bz2 #Sources 10+ : u1, u2 etc zip files containing changelogs and patches (if any) %if %{uversion} %(for ((i=1 ; i<=%{uversion} ; i++)) ; do echo Source$((9+i)): http://mamedev.org/updates/%{sversion}u${i}_diff.zip ;done) %endif BuildRequires: SDL1.2-devel BuildRequires: expat-devel BuildRequires: zlib-devel BuildRequires: libxinerama-devel BuildRequires: gtk2-devel BuildRequires: libGConf2-devel ExclusiveArch: %ix86 x86_64 ppc BuildRoot: %{_tmppath}/%{name}-%{version} %description SDL MAME is an arcade emulator using SDL, and based on the Multiple Arcade Machine Emulator (MAME). You can find a some freeware and their description on http://mamedev.org/roms/ If you some tricks to finish a game, the cheat.zip file is now provided in a other package named sdlmame-extra-data. This package is in PLF because of Mandriva policy regarding emulators. %prep %setup -c -n %{name}-%{version} -q unzip -qq mame.zip #files missing : ui.bdf, keymaps tar xvjf %{SOURCE2} #fixes doc line endings, + needed before patching find . -type f -not -name uismall.png | xargs perl -pi -e 's/\r\n?/\n/g' #apply u1, u2, etc... patches (if any) #fix line endings for mdv < 2010.1 %if %{uversion} %(for ((i=1 ; i<=%{uversion} ; i++)) ; do echo "unzip -qq %{_sourcedir}/%{sversion}u${i}_diff.zip" ; echo "perl -pi -e 's/\r\n/\n/g' %{sversion}u${i}.diff" ; echo "patch -p0 -s --fuzz=0 -E < %{sversion}u${i}.diff" ; done) %endif %build #notes: #fullname is prefix+name+suffix+suffix64+suffixdebug(+suffixexe) #optimizing for specific processor adds suffixes: #DEBUG=1 for the debugger #SYMBOLS=1 to build a -debug package #set ARCHOPTS for architecture-specific optimizations #(-march=,-msse3,-mcpu=,...) #Arch is auto-detected now, DRC options are set accordingly #no need for PTR64=1, PPC=1, X86_MIPS3_DRC=, X86_PPC_DRC=, etc %make all PREFIX=sdl \ NOWERROR=1 \ BUILD_ZLIB= \ BUILD_EXPAT= \ OPT_FLAGS="%optflags" %install rm -rf %{buildroot} install -d -m 755 %{buildroot}%{_gamesbindir} install -m 755 %{name}* %{buildroot}/%{_gamesbindir}/sdlmame.real #tools #useful to manage roms install -m 755 chdman %{buildroot}%{_gamesbindir}/chdman-sdlmame install -m 755 romcmp %{buildroot}%{_gamesbindir}/romcmp-sdlmame #useful to create a new keymap install -m 755 testkeys %{buildroot}%{_gamesbindir}/testkeys-sdlmame #other tools built: #jedutils, makemeta, regrep, srcclean #"support files" moved to sdlmame-extra-data #but the directory is still owned by this package install -d -m 755 %{buildroot}%{_gamesdatadir}/sdlmame #ui font install -m 644 ui.bdf %{buildroot}/%{_gamesdatadir}/sdlmame/ #keymaps install -d -m 755 %{buildroot}%{_gamesdatadir}/sdlmame/keymaps install -m 644 keymaps/* %{buildroot}/%{_gamesdatadir}/sdlmame/keymaps/ #install wrapper install -m 755 %{SOURCE1} %{buildroot}%{_gamesbindir}/sdlmame %files %defattr(-,root,root) %doc whatsnew*.txt docs/* %attr(0755,root,games) %{_gamesbindir}/sdlmame* %attr(0755,root,games) %{_gamesbindir}/*-sdlmame #{_mandir}/man1/sdlmame.1* %{_gamesdatadir}/sdlmame %clean rm -rf %{buildroot} %changelog * Wed Dec 1 2010 Guillaume Bedot <littletux@zarb.org> 0.140u1-1plf2011.0 - 0.140u1 - added more doc (whatsnew) * Mon May 17 2010 Guillaume Bedot <littletux@zarb.org> 0.138-1plf2010.1 - 0.138 * Tue Mar 23 2010 Guillaume Bedot <littletux@zarb.org> 0.137-1plf2010.1 - 0.137 * Sun Jan 10 2010 Guillaume Bedot <littletux@zarb.org> 0.136-1plf2010.1 - 0.136 * Fri Dec 18 2009 Zombie Ryushu <ryushu@zarb.org> 0.135u3-1plf2010.1 - 0.135u3 * Fri Sep 11 2009 Guillaume Bedot <littletux@zarb.org> 0.134-1plf2010.0 - 0.134 * Sat Sep 5 2009 Guillaume Bedot <littletux@zarb.org> 0.133u4-1plf2010.0 - 0.133u4 * Fri Jun 12 2009 Guillaume Bedot <littletux@zarb.org> 0.132-1plf2010.0 - 0.132 * Mon Apr 27 2009 Guillaume Bedot <littletux@zarb.org> 0.131-1plf2009.1 - 0.131 * Sun Apr 19 2009 Guillaume Bedot <littletux@zarb.org> 0.130u4-1plf2009.1 - 0.130u4 * Thu Jan 8 2009 Guillaume Bedot <littletux@zarb.org> 0.129-1plf2009.1 - 0.129 - added mameeinfo.dat (for qmc2) * Mon Oct 20 2008 Guillaume Bedot <littletux@zarb.org> 0.128-1plf2009.1 - 0.128 - xml cheats - added catver, history and nplayers * Fri Aug 15 2008 Guillaume Bedot <littletux@zarb.org> 0.126u5-1plf2009.0 - 0.126u5 - fix buildrequires * Sat Jul 12 2008 Guillaume Bedot <littletux@zarb.org> 0.126-1plf2009.0 - 0.126 - fix buildrequires - rpm spec policy proposal related changes - update description to point to some freeware roms * Thu May 29 2008 Guillaume Bedot <littletux@zarb.org> 0.125u2-1plf2009.0 - 0.125u2* Tue May 15 2007 Guillaume Bedot <littletux@zarb.org> 0.115-1plf2008.0 - First PLF package * Wed Mar 26 2008 Guillaume Bedot <littletux@zarb.org> 0.124-1plf2008.1 - 0.124 * Wed Feb 6 2008 Guillaume Bedot <littletux@zarb.org> 0.123-1plf2008.1 - 0.123 * Tue Feb 05 2008 Anssi Hannula <anssi@zarb.org> 0.122u7-2plf2008.1 - buildrequires libxinerama-devel * Mon Jan 28 2008 Guillaume Bedot <littletux@zarb.org> 0.122u7-1plf2008.1 - 0.122u7 * Thu Dec 20 2007 Guillaume Bedot <littletux@zarb.org> 0.122-1plf2008.1 - 0.122 * Tue Nov 27 2007 Guillaume Bedot <littletux@zarb.org> 0.121u1-1plf2008.1 - 0.121u1 * Wed Aug 15 2007 Guillaume Bedot <littletux@zarb.org> 0.118u1-1plf2008.0 - 0.118u1 - added testkeys binary and keymap support to the wrapper * Fri Jul 13 2007 Guillaume Bedot <littletux@zarb.org> 0.117-1plf2008.0 - 0.117 - simple wrapper added - fixed rights on cheat.dat - added ui.bdf - dropped cheat patch (no need with the wrapper) * Tue May 15 2007 Guillaume Bedot <littletux@zarb.org> 0.115-1plf2008.0 - First PLF package