File EmulationStation.spec of Package EmulationStation

#
# spec file for package EmulationStation
#
# Copyright (c) 2020 SUSE LLC
#
# 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/
#


Name:           EmulationStation
Version:        2.11.2
Release:        0.1
Summary:        A Fork of Emulation Station for RetroPie
License:        MIT
Group:          System/Emulators/Other
URL:            https://www.emulationstation.org
Source0:        EmulationStation-%{version}.tar.xz
Source1:        EmulationStation.desktop
Source2:        es_icon.png
Source3:        es_systems.cfg
Source4:        README.openSUSE
Source5:        theme-simple.zip
BuildRequires:  pkgconfig(alsa)
BuildRequires:  cmake
BuildRequires:  freeimage-devel
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  libcurl-devel
BuildRequires:  pkgconfig(RapidJSON)
BuildRequires:  unzip
BuildRequires:  pkgconfig(libvlc)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  freeimage-devel
#Requires:

%description
EmulationStation is a cross-platform graphical front-end for emulators with controller navigation.

%prep
%setup -q
%setup -q -T -D -a 5

%build
%cmake -DBUILD_SHARED_LIBS:BOOL=OFF
%cmake_build

%install
cd build
%make_install
cd ..

install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/EmulationStation.desktop
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/es_icon.png
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/emulationstation/es_systems.cfg

# resources
mkdir -p %{buildroot}%{_datadir}/emulationstation
cp -r resources %{buildroot}%{_datadir}/emulationstation

# theme
mkdir -p %{buildroot}%{_sysconfdir}/emulationstation/themes/simple
cp -r es-theme-simple-master/* %{buildroot}%{_sysconfdir}/emulationstation/themes/simple

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

# remove libpugixml
rm -r %{buildroot}%{_includedir}/pugiconfig.hpp
rm -r %{buildroot}%{_includedir}/pugixml.hpp
# rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-config-relwithdebinfo.cmake
rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-config.cmake
rm -r %{buildroot}%{_libdir}/libpugixml.a
rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-config-version.cmake
rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-targets-relwithdebinfo.cmake
rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-targets.cmake
rm -r %{buildroot}%{_libdir}/pkgconfig/pugixml.pc


%files
%{_bindir}/emulationstation
%{_datadir}/pixmaps/es_icon.png
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/emulationstation/
%dir %{_datadir}/emulationstation/resources/
%{_datadir}/emulationstation/resources/*
%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