File fceux.spec of Package fceux
#
# spec file for package fceux
#
# Copyright (c) 2012-2014 SuSE Linux Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012-2014 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.2.3
Release: 0
License: GPL-2.0
Summary: Nintendo Famicom (NES) Emulator
Url: http://fceux.com/web/home.html
Group: Amusements/Games/Other
Source: http://superb-dca2.dl.sourceforge.net/project/fceultra/Source%20Code/2.2.3%20src/fceux-2.2.3.src.tar.gz
BuildRequires: SDL-devel
BuildRequires: gcc-c++
BuildRequires: gd-devel
BuildRequires: gtk3-devel
%if 0%{?suse_version} <= 1210
BuildRequires: lua-devel
%else
BuildRequires: lua51-devel
%endif
BuildRequires: scons
BuildRequires: update-desktop-files
BuildRequires: -post-build-checks
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
# Fix end of line encoding warnings
find . -type f -exec sed -i 's/\r//' {} \;
# Fix "Your file uses __DATE and __TIME__ this causes the package to rebuild when not needed warning"
# We use the date from the changes file
set_date_time=`date --date "@\`stat --format %Y %{_sourcedir}/%{name}.changes\`" +"%H:%M %B %Y"`
sed -i 's/\_\_TIME\_\_ \" \" \_\_DATE\_\_ \"\\n\"/\"'"$set_date_time"'\\n\"/g' src/config.cpp
%build
CFLAGS="%{optflags} $CFLAGS -fno-strict-aliasing" scons RELEASE=1 GTK=0 GTK3=1 %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_bindir}
install -m 0755 bin/fceux %{buildroot}%{_bindir}/fceux
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -m 0644 fceux.png %{buildroot}%{_datadir}/pixmaps/fceux.png
mkdir -p %{buildroot}%{_mandir}/man6/
install -m 0644 documentation/fceux.6 %{buildroot}%{_mandir}/man6/
install -m 0644 documentation/fceux-net-server.6 %{buildroot}%{_mandir}/man6/
%suse_update_desktop_file -n -c fceux "Nintendo Famicom (NES) Emulator" "NES/Famicom emulator" fceux fceux System Emulator
%post
%desktop_database_post
%postun
%desktop_database_postun
%files
%defattr(-,root,root)
%doc Authors changelog.txt COPYING documentation/*
%doc bin/auxlib.lua output/luaScripts
%{_bindir}/fceux
%{_datadir}/applications/fceux.desktop
%{_mandir}/man6/fceux.6%{?ext_man}
%{_mandir}/man6/fceux-net-server.6%{?ext_man}
%{_datadir}/pixmaps/fceux.png
%changelog