Name: sdlmame Version: 0.147 %define sversion %(sed -r -e "s/\\.//" -e "s/(.*)u(.)/\\1/" <<<%{version}) %define uversion %(sed -r -e "s/(.*u)(.)/\\2/;t;c\\0" <<<%{version}) Release: %mkrel 0.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 # Needed to workaround gcc 4.4.x x86_64 internal compiler error Patch0: sdlmame-0.146-gcc4.4-ice.patch BuildRequires: SDL-devel BuildRequires: SDL_ttf-devel BuildRequires: expat-devel BuildRequires: zlib-devel BuildRequires: libxinerama-devel BuildRequires: gtk2-devel BuildRequires: libGConf2-devel BuildRequires: perl # Workaround BuildRequires: libxrender-devel >= 0.9.6 ExclusiveArch: %{ix86} x86_64 ppc %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. %prep %setup -c -n %{name}-%{version} -q unzip -qq mame.zip %if %{mdvver} < 201100 %ifarch x86_64 %patch0 -p1 %endif %endif #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 %{SOURCE$((9+i))}" ; 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 %clean %__rm -rf %{buildroot} %files %defattr(-,root,root) %doc docs/* %attr(0755,root,games) %{_gamesbindir}/sdlmame* %attr(0755,root,games) %{_gamesbindir}/*-sdlmame %{_gamesdatadir}/sdlmame %changelog * Sun Sep 23 2012 Zombie Ryushu <ryushu@mandriva.org> 0.147-0.1mdv2010.1 + Revision: 817354 - Upgrade to 0.147 - Upgrade to 0.147 - add u3 patch - Apply u2 patch - u1 patch to fix a BUNCH of horrible crashes patch p1 - u1 patch to fix a BUNCH of horrible crashes + Andrey Bondrov <abondrov@mandriva.org> - Add patch 0 to workaround gcc 4.4.x internal compiler error in 2010.2 x86_64 * Wed May 23 2012 Andrey Bondrov <abondrov@mandriva.org> 0.146-1 + Revision: 800169 - New version 0.146 * Wed Feb 08 2012 Andrey Bondrov <abondrov@mandriva.org> 0.145-1 + Revision: 771722 - Fix use-of-RPM_SOURCE_DIR error to make rpmlint happy - New version 0.145, minor spec cleanup * Thu Nov 17 2011 Andrey Bondrov <abondrov@mandriva.org> 0.144-1 + Revision: 731281 - New version 0.144 * Sun Jul 31 2011 Andrey Bondrov <abondrov@mandriva.org> 0.142u4-1 + Revision: 692563 - Fix BuildRequires - imported package sdlmame * Tue Jul 19 2011 Andrey Bondrov <bondrov@math.dvgu.ru> 0.142u4-1mdv2011.0 - Import from MIB * Fri May 27 2011 Andrey Bondrov <bondrov@math.dvgu.ru> 0.142u4-69.1mib2010.2 - 0.142u4 * 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