File tuxnes.spec of Package tuxnes
#
# spec file for package tuxnes
#
# Copyright (c) 2016 SUSE LINUX 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/
#
Name: tuxnes
Version: 20040824
Release: 0
Summary: NES emulator
License: GPL-2.0
Group: System/Emulators/Other
Url: http://tuxnes.sourceforge.net
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}.changes
Patch0: %{name}.dif
BuildRequires: SDL-devel
BuildRequires: automake
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1120
Patch1: %{name}-20040824-xshm.patch
%endif
%description
TuxNES is an emulator for the 8-bit Nintendo Entertainment System.
%prep
%setup -q -n %{name}
%patch0
%if 0%{?suse_version} > 1120
%patch1
%endif
# fix builddate info
# Remove build time references so build-compare can do its work
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE1} '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{SOURCE1} '+%%b %%e %%Y')
sed -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" -i emu.c fb.c
sed -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -i emu.c fb.c
%build
./autogen.sh
CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ./configure --prefix=%{_prefix}
make %{?_smp_mflags} CFLAGS="%{optflags}"
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
%files
%defattr(-,root,root)
%doc THANKS CHANGES ChangeLog COPYING AUTHORS BUGS HACKING NEWS
%{_bindir}/*
%changelog