File retroarch.spec of Package retroarch

# spec file for package
# Copyright © 2014 Csida Michael <>
# Copyright © 2016 Sergey Kondakov <>
# Copyright © 2017–2019 Markus S. <>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.

%define realname RetroArch
Summary:        A modular multi-system emulator system
Name:           retroarch
Version:        1.7.9
Release:        0
Group:          Emulators
License:        GPL-3.0-or-later
Source9:        %{name}.desktop
BuildRequires:  binutils gcc-c++
BuildRequires:  fdupes
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(libass)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(libv4l2)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(SDL2_gfx)
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_net)
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRequires:  pkgconfig(wayland-egl)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xv)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  python3-devel
BuildRequires:  systemd-devel
BuildRequires:  vulkan-devel
# for now RA wants its own copy of glslang
#BuildRequires:  glslang-devel
BuildRequires:  unzip
%if 0%{?suse_version} > 1500
BuildRequires:  p7zip-full
BuildRequires:  p7zip

%if 0%{?sle_version} == 150000 && 0%{?is_opensuse}
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavdevice)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libswscale)

BuildRoot:  %{_tmppath}/%{name}-%{version}-build

%if 0%{?fedora} > 26
%undefine _debugsource_packages

RetroArch is a modular multi-system emulator system that is designed to be
fast, lightweight, and portable. It has features few other emulators frontends
have, such as real-time rewinding and game-aware shading.

%setup -q -n %{realname}-%{version}

# it's an override, don't use it on desktop
#    --enable-opengles \
#    --enable-opengles3 \
# it's not standard configure script
./configure --prefix=%{_prefix} \
    --enable-7zip \
    --enable-alsa \
    --enable-al \
    --enable-dylib \
    --enable-egl \
    --enable-ffmpeg \
    --enable-freetype \
    --enable-jack \
    --enable-kms \
    --enable-libusb \
    --enable-materialui \
    --enable-mmap \
    --enable-networking \
    --enable-networkgamepad \
    --enable-opengl \
    --enable-pulse \
    --enable-qt \
    --enable-sdl2 \
    --enable-ssa \
    --enable-threads \
    --enable-thread_storage \
    --enable-udev \
    --enable-v4l2 \
    --enable-vulkan \
    --enable-wayland \
    --enable-x11 \
    --enable-xmb \
    --enable-xvideo \
    --enable-zlib \
%ifarch x86
    --enable-sse \
make %{?jobs:-j%jobs}


mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE9} %{buildroot}%{_datadir}/applications/
%fdupes %{buildroot}

%config(noreplace) %{_sysconfdir}/%{name}.cfg
%dir %{_datadir}/doc/%{name}