File pcsx.spec of Package pcsx

#
# spec file for package pcsx (Version 1.5)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           pcsx
BuildRequires:  ImageMagick gtk2-devel libtiff-devel nasm psx-plugins recode update-desktop-files
Url:            http://www.pcsx.net/
License:        GPL v2 or later
Group:          System/Emulators/Other
Requires:       psx-plugins
AutoReqProv:    on
Version:        1.5
Release:        204
Summary:        Open Source Sony PlayStation emulator
Source:         PcsxSrc-1.5.tar.bz2
Source10:       pcsx.sh
Source11:       pcsx.desktop
#Source11: Pcsx-1.0-patch.zip
Patch:          PcsxSrc.dif
Patch2:         PcsxSrc-gcc4.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This application emulates all components of a Sony PlayStation on
regular PC hardware. It features a sophisticated plugin system allowing
for easy extension and is highly configurable.

To be able to play commercial games on this emulator you need an image
of a Sony PlayStation BIOS ROM. The BIOS is copyrighted by Sony
Computer Entertainment and can therefore not be included in this
package. Information on how to create such an image can be found at the
following web page:

http://www.psxemu.com/faq/faq-bios.shtml

BIOS images have to be placed in /usr/share/pcsx/Bios



Authors:
--------
    Linuzappz <linuzappz@pcsx.net>
    Shadow  <shadow@pcsx.net>
    Pete Bernert <blackdove@addcom.de>
    Lewpy <lewpy@psxemu.com>
    lu_zero
    Darko Matesic <thedarkma@ptt.yu>
    syo <syo68k@geocities.co.jp>
    Lamer0 <Lamer0@mediaone.net>

%prep
%setup -n PcsxSrc-%version
for i in *.[ch] */*.[ch] Linux/Makefile
do
	recode -f ibmpc..lat1 $i
done
%patch
%patch2 -p1

%build
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
cd Linux
./configure
%ifarch %ix86
make CPU=ix86 STRIP=true
%else
#make
make %{?jobs:-j%jobs} -k STRIP=true
%endif
cd ..
convert pcsxAbout.bmp pcsxAbout.xpm

%install
%define PCSXDIR /usr/share/%{name}
install -m 755 -d $RPM_BUILD_ROOT%{PCSXDIR}/Bios
ln -sf /usr/%{_lib}/psx-plugins/Plugin $RPM_BUILD_ROOT%{PCSXDIR}/Plugin
ln -sf /usr/%{_lib}/psx-plugins/cfg $RPM_BUILD_ROOT%{PCSXDIR}/cfg
install -m 755 -d $RPM_BUILD_ROOT%{PCSXDIR}/memcards
install -m 755 -d $RPM_BUILD_ROOT%{PCSXDIR}/sstates
install -m 755 -d $RPM_BUILD_ROOT%{PCSXDIR}/snap
install -m 755 -d $RPM_BUILD_ROOT%{PCSXDIR}/.pixmaps
install -m 644 pcsxAbout.xpm $RPM_BUILD_ROOT%{PCSXDIR}/.pixmaps
install -m 755 Linux/pcsx $RPM_BUILD_ROOT%{PCSXDIR}
chmod 644 Docs/*
install -m 755 -d $RPM_BUILD_ROOT/usr/bin
sed "s,PCSXDIR,%{PCSXDIR},g" <%{SOURCE10} >$RPM_BUILD_ROOT/usr/bin/pcsx
chmod 755 $RPM_BUILD_ROOT/usr/bin/pcsx
%suse_update_desktop_file -i %name System Emulator

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-,root,root)
%doc Docs/*
%{PCSXDIR}
/usr/bin/pcsx
/usr/share/applications/*.desktop

%changelog
* Thu Jun 21 2007 uli@suse.de
- move plugins out of /usr/share
* Wed Feb 28 2007 dmueller@suse.de
- reduce BuildRequires
* Wed Feb 22 2006 uli@suse.de
- update -> 1.5 (fixes bug #152061)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Jan 15 2006 schwab@suse.de
- Don't strip binaries.
* Wed Oct 12 2005 mmj@suse.de
- add -fno-strict-aliasing
* Tue Apr 26 2005 yxu@suse.de
- eliminate superflous data type definitions
* Tue Jun 29 2004 ro@suse.de
- added libjpeg to neededforbuild
* Tue Jun 29 2004 ro@suse.de
- added libtiff to neededforbuild
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Fri Aug 15 2003 adrian@suse.de
- add desktop file
* Mon Jul 28 2003 ro@suse.de
- added libexif to neededforbuild
* Thu Jun 05 2003 ro@suse.de
- added psx-plugins to neededforbuild
* Wed May 28 2003 coolo@suse.de
- use BuildRoot
* Wed Jan 29 2003 ro@suse.de
- fix build with gcc-3.3 (preprocessor token pasting)
* Fri Jul 12 2002 uli@suse.de
- update -> 1.3 (HLE BIOS rewritten, lots of fixes, SPUasync
  support, gme support)
* Fri Jul 05 2002 kukuk@suse.de
- Use %%ix86 macro
* Thu May 23 2002 uli@suse.de
- made wrapper script deal with changes in cfg dir
* Mon May 06 2002 uli@suse.de
- update -> 1.2 (sound works, speedups, mouse and analog emulation
  fixed & more)
* Wed Feb 06 2002 uli@suse.de
- moved plugins to separate package psx-plugins
* Thu Jan 17 2002 uli@suse.de
- use MesaGL plugin that does not depend on libXxf86vm.so.1
* Mon Jan 14 2002 uli@suse.de
- updated PeopsSoftGpu -> 1.4 (bugfixes, fullscreen support)
* Fri Jan 11 2002 uli@suse.de
- added bugfix patch from homepage
- added missing "About" pixmap
- disabled CD debug output
* Mon Jan 07 2002 uli@suse.de
- initial package
- builds on all archs, but only works on x86 and ARM :)
- aborted attempts to do endianness/64 bit fixes, too
  time-intensive
openSUSE Build Service is sponsored by