LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fceux.spec of Package fceux-2.1 (Project home:linux4humans:games)

#
# spec file for package fceux
#
# Copyright (c) 2012 SuSE Linux Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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/
#

Name:           fceux
Version:        2.1.5
Release:        0
License:        GPL-2.0
Summary:        Nintendo Famicom (NES) Emulator
Url:            http://fceux.com/web/home.html
Group:          Amusements/Games/Other
Source:         http://downloads.sourceforge.net/fceultra/fceux-2.1.5.src.tar.bz2
Patch1:         fceux-2.1.5-datatype-gz.patch
BuildRequires:  SDL-devel
BuildRequires:  gcc-c++
BuildRequires:  gd-devel
BuildRequires:  gtk2-devel
BuildRequires:  lua-devel
BuildRequires:  scons
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FCEUX is a cross platform, NTSC and PAL Famicom/NES emulator that is an
evolution of the original FCE Ultra emulator. Over time FCE Ultra had
separated into many separate branches.

The concept behind FCEUX is to merge elements from FCE Ultra, FCEU
rerecording, FCEUXD, FCEUXDSP, and FCEU-mm into a single branch of FCEU. As
the X implies, it is an all-encompassing FCEU emulator that gives the best
of all worlds for the casual player, the ROM-hacking community, Lua
Scripters, and the Tool-Assisted Speedrun Community.

%prep
%setup -q -c
%patch1 -p1
# Fix end of line encoding warnings
find . -type f -exec sed -i 's/\r//' {} \;
#FIXME MANUAL UPDATE OF DATE REQUIRED HERE!!!!
# Fix "Your file uses  __DATE and __TIME__ this causes the package to rebuild when not needed warning"
sed -i 's/\"\_\_TIME\_\_\" \"\_\_DATE\_\_\"\\n/Built January 2012\\n/g' fceu%{version}/src/config.cpp

%build
cd fceu%{version}
CFLAGS="%{optflags} -fno-strict-aliasing" LDFLAGS="$LDFLAGS -ldl -lX11" scons %{?_smp_mflags} CREATE_AVI=1

%install
cd fceu%{version}
install -Dpm 0755 bin/fceux %{buildroot}%{_bindir}/fceux
install -Dpm 0644 fceux.png %{buildroot}%{_datadir}/pixmaps/fceux.png
%suse_update_desktop_file -n -c fceux "Nintendo Famicom (NES) Emulator" "NES/Famicom emulator" fceux fceux System Emulator

%post
%if 0%{?sles_version} && 0%{?suse_version} == 1110
update-desktop-database &> /dev/null || :
%else
%desktop_database_post
%endif

%postun
%if 0%{?sles_version} && 0%{?suse_version} == 1110
update-desktop-database &> /dev/null || :
%else
%desktop_database_postun
%endif

%clean
%{?buildroot:%__rm -rf %{buildroot}}

%files
%defattr(-,root,root)
%doc fceu%{version}/Authors.txt fceu%{version}/bin/*.chm fceu%{version}/bin/auxlib.lua
%doc fceu%{version}/changelog.txt fceu%{version}/COPYING
%doc fceu%{version}/documentation/* fceu%{version}/output/luaScripts
%{_bindir}/fceux
%{_datadir}/applications/fceux.desktop
%{_datadir}/pixmaps/fceux.png

%changelog