File EmulationStation.spec of Package EmulationStation

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


# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name:           EmulationStation
Version:        X
Release:        0
Summary:        A cross-platform graphical front-end for emulators
License:        MIT
Group:          System/Emulators/Other
URL:            http://www.emulationstation.org/
Source0:        %{name}-%{version}.tar.gz
Source1:        es_icon.png
Source2:        es_systems.cfg
Source3:        README.openSUSE
Source4:        themes.tar.gz
Patch0:         stringcompare.patch
Patch1:         date_time.patch
BuildRequires:  alsa-devel
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  eigen3-devel
BuildRequires:  freeimage-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  libSDL2-devel
BuildRequires:  libboost_date_time-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_locale-devel
BuildRequires:  libboost_system-devel
BuildRequires:  libcurl-devel

%description
A graphical and themeable emulator front-end that allows you to access all your favorite games in one place, even without a keyboard!

%prep
%setup -q
%setup -q -T -D -a 4
%patch0
%patch1

%build
%cmake
make %{?_smp_mflags}

%install
cd build
%make_install
cd ..

install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/es_icon.png
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/emulationstation/es_systems.cfg
mkdir -p %{buildroot}%{_sysconfdir}/emulationstation/themes/simple
cp -r themes %{buildroot}%{_sysconfdir}/emulationstation/

#Doc files
mkdir -p %{buildroot}%{_docdir}/EmulationStation/
install -D -m 0644 *.md %{buildroot}%{_docdir}/EmulationStation/
install -D -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/EmulationStation/README.openSUSE


#missed desktop file, writing one
mkdir -p %{buildroot}%{_datadir}/applications/
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Name=EmulationStation
GenericName=EmulationStation
Comment= A cross-platform graphical front-end for emulators
Comment[it]= Un front-end grafico per emulatori cross-platform
Exec=%{_bindir}/emulationstation
Icon=es_icon
StartupNotify=true
Terminal=false
Type=Application
Categories=Game;Simulation;
EOF

%files
%{_bindir}/emulationstation
%{_datadir}/pixmaps/es_icon.png
%{_datadir}/applications/%{name}.desktop
%dir %{_sysconfdir}/emulationstation/
%dir %{_sysconfdir}/emulationstation/themes/
%config %{_sysconfdir}/emulationstation/themes/simple/
%config %{_sysconfdir}/emulationstation/es_systems.cfg
%docdir %{_docdir}/EmulationStation/
%{_docdir}/EmulationStation/

%changelog
openSUSE Build Service is sponsored by