File hugo.spec of Package hugo

#
# spec file for package hugo
#
# 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/
#


%define    name   hugo
%define    longname  Hu-Go!
%define    version   2.12
Name:           %{name}
Version:        %{version}
Release:        0
Summary:        %{longname} - PC Engine Emulator
License:        GPL-2.0 and BSD-3-Clause
Group:          System/Emulators/Other
Url:            http://www.zeograd.com/
Source0:        http://www.zeograd.com/download/%{name}-%{version}.tar.bz2
Source1:        %{name}.changes
Patch0:         %{name}-%{version}.patch
Patch1:         %{name}-rpmlint.patch
BuildRequires:  SDL-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_net-devel
BuildRequires:  gtk2-devel
BuildRequires:  latex2html
BuildRequires:  libvorbis-devel
BuildRequires:  lyx
BuildRequires:  tidy
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Hu-go! is a TurboGrafx 16/PC-Engine Emulator.

%prep

%setup -q
%patch0
%patch1
# fix builddate info
# Remove build time references so build-compare can do its work
cp %{SOURCE1} .
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" -i pce.c
sed -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -i pce.c

%build
export CFLAGS="-fgnu89-inline"
%configure \
	--with-sdl-mixer --with-ogg-support
make %{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install

%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/hugo
%{_bindir}/hugod
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by