File Retropie-EmulationStation.spec of Package Retropie-EmulationStation
#
# spec file for package Retropie-EmulationStation
#
# Copyright (c) 2021 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: Retropie-EmulationStation
Version: X
Release: 0
Summary: A Fork of Emulation Station for RetroPie
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
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: libcec-devel
BuildRequires: libcurl-devel
BuildRequires: rapidjson-devel
BuildRequires: vlc-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
%build
%cmake
%make_build
%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
rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-config-relwithdebinfo.cmake
rm -r %{buildroot}%{_libdir}/cmake/pugixml/pugixml-config.cmake
rm -r %{buildroot}%{_includedir}/pugiconfig.hpp
rm -r %{buildroot}%{_includedir}/pugixml.hpp
rm -r %{buildroot}%{_libdir}/libpugixml.so*
%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