File libretro-genesis-plus-gx.spec of Package libretro-genesis_plus_gx
# Debug depends on system CFLAGS but various cores use their own
# It's quite a pain to patch every core for CFLAGS and maintain patches
# And debug is not really needed here anyway
%define _enable_debug_packages %{nil}
%define debug_package %{nil}
Name: libretro-genesis-plus-gx
Version: 20230602
Release: 1.1
Summary: An interface for emulator and game ports
Group: Emulators
# Actually, various for each core but mostly GPLv2
License: GPL
URL: http://www.libretro.org/
# fetched via libretro-fetch.sh from git and re-packed
Source0: https://github.com/libretro/Genesis-Plus-GX/archive/master.zip
Source1: https://raw.githubusercontent.com/libretro/libretro-super/master/dist/info/genesis_plus_gx_libretro.info
Suggests: retroarch
BuildRequires: cmake
BuildRequires: pkgconfig(zlib)
BuildRequires: libpng-devel
BuildRequires: pkgconfig(gl)
BuildRequires: SDL-devel
BuildRequires: unzip
%description
For each emulator 'core', RetroArch makes use of a library API that we like
to call 'libretro'.
Think of libretro as an interface for emulator and game ports. You can make
a libretro port once and expect the same code to run on all the platforms
that RetroArch supports. It's designed with simplicity and ease of use in
mind so that the porter can worry about the port at hand instead of having
to wrestle with an obfuscatory API.
The purpose of the project is to help ease the work of the emulator/game
porter by giving him an API that allows him to target multiple platforms
at once without having to redo any code. He doesn't have to worry about
writing input/video/audio drivers - all of that is supplied to him by
RetroArch. All he has to do is to have the emulator port hook into the
libretro API and that's it - we take care of the rest.
%prep
%setup -q -n Genesis-Plus-GX-master
%build
export CFLAGS="-O2 -march=atom"
export CXXFLAGS="-O2 -march=atom"
make -f Makefile.libretro
%install
mkdir -p %{buildroot}%{_libdir}/libretro/
install genesis_plus_gx_libretro.so %{buildroot}%{_libdir}/libretro/
cp %{SOURCE1} %{buildroot}%{_libdir}/libretro/
%files
%{_libdir}/libretro