Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > c57190041a02b16a504c6be177d401f4 > files > 4

zsnes-1.51-10mdv2010.1.src.rpm

%define name zsnes
%define version 1.51
%define release %mkrel 10
%define fversion %(echo %version|sed s/\\\\\.//)
%define dversion %(echo %version|sed s/\\\\\./_/)

Summary: Nintendo Super NES / Super Famicom Emulator
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://prdownloads.sourceforge.net/zsnes/%{name}%{fversion}src.tar.bz2
Source1: %{name}-icons.tar.bz2
Patch0: zsnes150-desktop.patch
Patch1: zsnes-1.51-libao.patch
Patch2:	zsnes-1.51-gcc43.patch
License: GPLv2+
Group: Emulators
BuildRoot: %{_tmppath}/%{name}-buildroot
URL: http://zsnes.sourceforge.net
BuildRequires: nasm
BuildRequires: libpng-devel
BuildRequires: libSDL-devel >= 1.2 
BuildRequires: libmesagl-devel
BuildRequires: libncurses-devel
BuildRequires: libao-devel
Epoch: 1
#do not build currently on x86_64
ExclusiveArch: %ix86

%description
This is an emulator for Nintendo's 16 bit console, called Super Nintendo 
Entertainment System or Super Famicom. It features a pretty accurate emulation
of that system's graphic and sound capabilities.
The GUI enables the user to select games, change options, enable cheat codes 
and to save the game state, even network play is possible.


%prep

%setup -q -n %{name}_%dversion
%patch0 -p1
%patch1 -p1
%patch2 -p0
cd src
#./autogen.sh
autoreconf -fiv

%build
cd src
# zsnes do not work with fortify patch, and i frankly do not want to mess with the mix of asm and C source code
# (misc)
export CFLAGS="-O2 -g -pipe -fexceptions -fomit-frame-pointer -fasynchronous-unwind-tables"
%configure2_5x --x-includes=/usr/X11R6/include --enable-libao --disable-cpucheck force_arch=i586 
make

%install
rm -rf %buildroot
mkdir -p %buildroot%{_bindir}
install -c -m 0755 src/zsnes %buildroot%{_bindir}

mkdir -p %buildroot%{_mandir}/man1/
install -c -m 0644 src/linux/zsnes.1 %buildroot%{_mandir}/man1

install -m 644 -D src/linux/zsnes.desktop %buildroot%_datadir/applications/zsnes.desktop

# install icons
install -m 755 -d %buildroot{%{_miconsdir},%{_iconsdir},%{_liconsdir}}
tar xOjf %SOURCE1 %{name}-16x16.png > %buildroot%{_miconsdir}/%{name}.png
tar xOjf %SOURCE1 %{name}-32x32.png > %buildroot%{_iconsdir}/%{name}.png
tar xOjf %SOURCE1 %{name}-48x48.png > %buildroot%{_liconsdir}/%{name}.png

%clean
rm -rf %buildroot

%if %mdkversion < 200900
%post
%{update_menus}
%endif

%if %mdkversion < 200900
%postun
%{clean_menus}
%endif

%files
%defattr(-,root,root)
%doc docs/*
%{_bindir}/*
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_mandir}/man1/%{name}.1*
%{_datadir}/applications/%{name}.desktop




%changelog
* Sun Mar 28 2010 Funda Wang <fwang@mandriva.org> 1:1.51-10mdv2010.1
+ Revision: 528414
- rebuild

* Mon Sep 21 2009 Thierry Vignaud <tv@mandriva.org> 1:1.51-9mdv2010.0
+ Revision: 446352
- rebuild

* Thu Mar 19 2009 Michael Scherer <misc@mandriva.org> 1:1.51-8mdv2009.1
+ Revision: 357567
- rebuild

* Sun Mar 01 2009 Emmanuel Andry <eandry@mandriva.org> 1:1.51-7mdv2009.1
+ Revision: 346250
- use autoreconf
- fix gcc43 build with P2 from gentoo

  + Thierry Vignaud <tv@mandriva.org>
    - rebuild
    - rebuild

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Wed Mar 12 2008 Guillaume Bedot <littletux@mandriva.org> 1:1.51-4mdv2008.1
+ Revision: 187178
- builds only for 32bit
- removed optimizations
- fix libao output (patch1)

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Fri Jun 01 2007 Michael Scherer <misc@mandriva.org> 1:1.51-3mdv2008.0
+ Revision: 33533
- use libao output, as suggested by brancaleone


* Sun Feb 11 2007 Michael Scherer <misc@mandriva.org> 1.51-2mdv2007.0
+ Revision: 118827
- use option to make it work on other arch than p4 ( ie do not optimize for cluster )

* Thu Jan 25 2007 Götz Waschk <waschk@mandriva.org> 1:1.51-1mdv2007.1
+ Revision: 113082
- new version

* Tue Dec 26 2006 Nicolas Lécureuil <neoclust@mandriva.org> 1:1.50-3mdv2007.1
+ Revision: 102078
- Remove old debian menu style

* Sat Dec 23 2006 Michael Scherer <misc@mandriva.org> 1:1.50-2mdv2007.1
+ Revision: 101952
- fix build on x86_64, with previous changes
- rebuild, to fix bug #23844 ( zsnes not working )
- do not use FORTIFY, zsnes segfault quite immediatly

* Sat Dec 23 2006 Götz Waschk <waschk@mandriva.org> 1:1.50-1mdv2007.1
+ Revision: 101900
- fix buildrequires
- build on x86_64 as well
- add menu entry
- Import zsnes

* Sat Dec 23 2006 Götz Waschk <waschk@mandriva.org> 1.50-1mdv2007.1
- new version

* Tue Apr 11 2006 Michael Scherer <misc@mandriva.org> 1:1.42-2mdk
- Rebuild
- use mkrel

* Thu Jan 20 2005 Götz Waschk <waschk@linux-mandrake.com> 1.42-1mdk
- new version

* Mon Dec 27 2004 Götz Waschk <waschk@linux-mandrake.com> 1.40-1mdk
- spec fixes
- New release 1.40

* Sun Jun 06 2004 Michael Scherer <misc@mandrake.org> 1.36-4mdk 
- rebuild
- change menu