%global _libdir /usr/lib %global LIBDIR /usr/lib %define snapshot_num 5761 Name: pcsx2 Version: 1.1.0 Release: 5.%{snapshot_num}%{?dist} Summary: A Sony Playstation2 emulator License: GPLv3 URL: https://code.google.com/p/pcsx2/ Source0: https://pcsx2.googlecode.com/files/%{name}-%{version}.tar.bz2 #Source1: bios.tar.bz2 Source2: %{name}.png Patch1: %{name}-1.1.0_fedora_cflags_opts.diff # PCSX2 does not support running as a 64 bit application. # http://code.google.com/p/pcsx2/wiki/ChrootAnd64bStatusLinux BuildRequires: desktop-file-utils Cg libCg cmake zlib-devel bzip2-devel libXrandr-devel freetype-devel glew glew-devel gettext libGL-devel BuildRequires: libGLU-devel libjpeg-turbo-static libjpeg-turbo-devel alsa-lib-devel SDL-devel gtk2-devel portaudio-devel sparsehash-devel BuildRequires: soundtouch-devel libX11-devel libICE-devel libaio-devel mesa-libGL-devel mesa-libEGL-devel mesa-libGLw mesa-libGLw-devel BuildRequires: mesa-libGLU-devel mesa-libOSMesa mesa-libOSMesa-devel xorg-x11-xtrans-devel glibc-devel libXxf86vm-devel xorg-x11-proto-devel BuildRequires: glib2-devel gdk-pixbuf2-devel atk-devel pango-devel cairo-devel ImageMagick BuildRequires: wxGTK-devel <= 2.8.12 #BuildRequires: cmake glibc-devel glibc-devel.i686 libXrandr-devel libXrandr-devel.i686 bzip2-devel bzip2-devel.i686 libICE-devel libICE-devel.i686 glew-devel glew-devel.i686 mesa-libGL-devel mesa-libGL-devel.i686 mesa-libGLU-devel mesa-libGLU-devel.i686 mesa-libGLw-devel mesa-libGLw-devel.i686 mesa-libOSMesa mesa-libOSMesa-devel.i686 mesa-libEGL-devel mesa-libEGL-devel.i686 alsa-lib-devel alsa-lib-devel.i686 Cg Cg.i686 libXxf86vm-devel libXxf86vm-devel.i686 xorg-x11-proto-devel libX11-devel libX11-devel.i686 xorg-x11-xtrans-devel libCg libCg.i686 SDL-devel SDL-devel.i686 sparsehash-devel sparsehash-devel.i686 freetype-devel freetype-devel.i686 gtk2-devel gtk2-devel.i686 zlib-devel zlib-devel.i686 libjpeg-turbo-devel libjpeg-turbo-devel.i686 libjpeg-turbo-static libjpeg-turbo-static.i686 wxGTK-devel wxGTK-devel.i686 portaudio-devel portaudio-devel.i686 glib2-devel glib2-devel.i686 gdk-pixbuf2-devel gdk-pixbuf2-devel.i686 atk-devel.i686 pango-devel.i686 cairo-devel.i686 soundtouch-devel soundtouch-devel.i686 libaio-devel libaio-devel.i686 gettext gettext.i686 libGL-devel libGL-devel.i686 libGLU-devel libGLU-devel.i686 Requires: joystick hicolor-icon-theme Requires: /usr/lib/libCg.so Requires: /usr/lib/alsa-lib/libasound_module_pcm_pulse.so ExclusiveArch: %{ix86} %description A Playstation 2 emulator. Requires a dump of a real PS2 BIOS (not included) WARNING: It requires a CPU with SSE2 instructions. If your CPU does not support this instruction set, it does not have enough horse power to run this emulator anyway. %prep %setup -q %patch1 -p1 tar -xf %{S:0} #tar -xf %{S:1} # To remove executable bits from man, doc and icon files chmod -x %{name}/Docs/GPL.txt %{name}/Docs/License.txt %{name}/Docs/readme-Docs.txt %{name}/Docs/PCSX2_FAQ.doc %{name}/Docs/PCSX2_Readme.doc bin/docs/pcsx2.1 linux_various/pcsx2.xpm # Remove DOS encoding errors in txt files sed -i 's/\r//' %{name}/Docs/GPL.txt sed -i 's/\r//' %{name}/Docs/License.txt %build # pcsx2 contains cflags that override Fedora cflags, however # a conservative approach has been taken because to quote upsteam "PCSX2 is not # an ordinary sofware. Most of the code executed are self-generated by PCSX2 # itself (aka dynamic recompiler/virtual machine). That means 1/ gcc flags # have no much impact on speed 2/ some gcc flags (used to) crash PCSX2" # Extensive testing will is therefore needed. See rpmfusion bug #2455 %cmake . -DPACKAGE_MODE=TRUE \ -DGLSL_SHADER_DIR=%{_libdir}/%{name} \ -DBUILD_REPLAY_LOADERS=FALSE \ -DEGL_API=TRUE \ -DXDG_STD=TRUE \ -DGLSL_API=FALSE \ -DPLUGIN_DIR=%{_libdir}/%{name} \ -DGAMEINDEX_DIR=%{_datadir}/%{name} \ -DCMAKE_BUILD_STRIP=FALSE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ make %{?_smp_mflags} LIBDIR=%{_libdir} VERBOSE=1 %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} # strip extra copies of pdf files, which are now in /doc/pcsx2 rm -rf %{buildroot}/usr/share/doc/pcsx2 # Install Desktop file desktop-file-install \ --dir=%{buildroot}/%{_datadir}/applications \ linux_various/pcsx2.desktop #strip extra copy of icon file, Wrong place for fedora rm -rf %{buildroot}/usr/share/pixmaps # Install man page mkdir -p %{buildroot}/%{_mandir}/man1 install -p -D -m 644 bin/docs/pcsx2.1 %{buildroot}/%{_mandir}/man1 %find_lang pcsx2_Iconized %find_lang pcsx2_Main # Install icon for res in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96; do \ %{__mkdir_p} %{buildroot}/%{_datadir}/icons/hicolor/${res}/apps convert -size 128x128 %{S:2} -resize ${res} %{buildroot}/%{_datadir}/icons/hicolor/${res}/apps/%{name}.png done; # install bios #mkdir -p %{buildroot}/etc/skel/.config/pcsx2/bios #install -D -m 644 bios/* %{buildroot}/etc/skel/.config/pcsx2/bios %post /sbin/ldconfig /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun /sbin/ldconfig if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %files -f pcsx2_Iconized.lang -f pcsx2_Main.lang %doc bin/docs/PCSX2_Readme.pdf bin/docs/PCSX2_FAQ.pdf %{_bindir}/%{name} %{_libdir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_mandir}/man1/%{name}.* %{_datadir}/%{name} #/etc/skel/.config/pcsx2/bios %changelog * Wed Nov 20 2013 Asif Ali Rizvan - 1.1.0-5-5761 - update and removed bios from sources and enabled --egl * Mon Sep 23 2013 Muhammad Shaban - 1.1.0-5.5731 - update * Sat Jul 27 2013 Giles Birchley - 1.1.0-5 - made overlooked change suggested in rpmfusion review (#2455) - changed requires from libGL-devel/libGLU-devel instead of mesa-libGL-devel * Sun Jun 30 2013 Giles Birchley - 1.1.0-4 - made some minor changes suggested in rpmfusion review (#2455) - removed backslash in cmake command - removed pcsx2-1.1.0-fedora_cflags.diff - replaced patch with pcsx2-1.1.0-fedora_cflags_opts.diff * Tue Jun 25 2013 Giles Birchley - 1.1.0-3 - made some minor changes suggested in rpmfusion review (#2455) - fix URL * Tue Jun 25 2013 Giles Birchley - 1.1.0-2 - made some minor changes suggested in rpmfusion review (#2455): - changed icon install permissions - changed URL - changed description line length - reintroduced %%{version} macro to source0 - removed extra backslash from %%cmake - changed line indentations so all are single space - removed -DDOC_DIR from %%cmake - removed extraneous remove lines * Sun Jun 09 2013 Giles Birchley - 1.1.0-1 - changes following rpmfusion review (#2455). - removed Group tag. - updated source to v1.1 (linux fixes) - removed pcsx2-1.0.0_helpfile.diff (no longer needed). - removed pcsx2-1.0.0_fedora_cmake.diff (Fedora<16 is no longer supported). - removed pcsx2-1.1.0_fedora_gcc.diff as this patch is now applied in 1.1.0 source - added Requires: hicolor-icon-theme (icons in %%{_datadir}/icons/hicolor/). - added BuildRequires: libaio-devel (needed for 1.1.0). - added warning about SSE2 to %%description. - comment about 64 bit status shortened. - version from names of docs removed (unversioned in 1.1.0). - fixed omissions in pcsx2.xpm shebang (fix rpmlint error) - Use %%{_docdir} instead of %%{_defaultdocdir}. - removed some docs that were either misplaced or should not be packaged. - removed specification of CMAKE_INSTALL_PREFIX and CMAKE_VERBOSE_MAKEFILE (%%cmake macro already sets them). - moved %%find_lang macro to end of %%install. - moved shell invocation to line following %%post %%postun (fix rpmlint error) * Mon May 27 2013 Giles Birchley - 1.0.0-2 - further changes to comply with rpmfusion review (#2455): - libGL-devel/libGLU-devel instead of mesa-libGL-devel - Remove BuildRequires: libCg (redundant with Cg) - Use %%{_prefix} instead of /usr for CMAKE install prefix - add Gregory Hainaut's patch to fix issue with gcc 4.8, for Fedora 19 build - Changed cmake option of DBUILD_REPLAY_LOADERS to false and changed %%files accrdingly * Mon Oct 15 2012 Giles Birchley - 1.0.0-1 - Build of official 1.0.0 Release - Significant modifications to script to comply with Fedora/RPMFusion packaging requirements - Removed redundant BuildRequires - Added upstream source - Added Patch to make CFLAGS compliant - Changed DCMAKE_BUILD_STRIP to FALSE to allow rpm debug package to be created - Changed document destination in cmake by specifying DDOC_DIR= - Changed language detection - Changed icon and desktop file installation * Tue Aug 09 2011 Danger Boy - 0.9.8.4851-1 - initial build