File Hu-Go.spec of Package Hu-Go

#
# spec file for package Hu-Go
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


%define    name   Hu-Go
%define    srcname   hugo
%define    longname  Hu-Go!
%define    version   2.12
Name:           %{name}
Version:        %{version}
Release:        0
Summary:        %{longname} - PC Engine Emulator
License:        GPL-2.0-only AND BSD-3-Clause
Group:          System/Emulators/Other
URL:            http://www.zeograd.com/
Source0:        http://www.zeograd.com/download/%{srcname}-%{version}.tar.bz2
Source1:        %{name}.changes
Patch0:         %{srcname}-%{version}.patch
Patch1:         %{srcname}-rpmlint.patch
BuildRequires:  gtk2-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(SDL_net)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  pkgconfig(vorbis)
Provides:       %{srcname}

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

%prep

%setup -q -n %{srcname}-%{version}
%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_install

%files
%license COPYING
%doc AUTHORS NEWS README
%{_bindir}/hugo
%{_bindir}/hugod
%{_datadir}/%{srcname}

%changelog
openSUSE Build Service is sponsored by