%define apiver 2.0 %define major 0 %define libname %{?_lib}sdl%{apiver}_%{major} %define develname %{?_lib}sdl%{apiver}-devel %define develsname %{?_lib}sdl%{apiver}-static-devel Name: sdl2 Summary: Simple DirectMedia Layer 2 Version: 2.30.6 Release: 1%{?dist} License: Zlib Group: System/Libraries URL: https://libsdl.org/ Source0: https://libsdl.org/release/SDL2-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(gbm) BuildRequires: libnas-devel BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(ibus-1.0) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(libdecor-0) BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.20 BuildRequires: pkgconfig(libpulse-simple) BuildRequires: pkgconfig(samplerate) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xxf86vm) Recommends: libdecor %description This is the Simple DirectMedia Layer 2, a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms. SDL fully supports high end 3D graphics using Direct3D and OpenGL, and has a 2D graphics API for emulators and classic games. %package -n %{libname} Summary: Main library for %{name} Group: System/Libraries %description -n %{libname} This package contains the library needed to run programs dynamically linked with %{name}. %package -n %{develname} Summary: Headers for developing programs that use %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: SDL2-devel = %{version}-%{release} Requires: alsa-lib-devel Requires: pkgconfig(gl) Requires: pkgconfig(glu) Requires: pkgconfig(egl) %description -n %{develname} This package contains the headers that programmers will need to develop applications which will use %{name}. %package -n %{develsname} Summary: Static library for developing static programs that use %{name} Group: Development/C %description -n %{develsname} This package contains the static library that programmers will need to develop static applications which are using %{name}. %prep %autosetup -p1 -n SDL2-%{version} %build %cmake -DSDL_RPATH=OFF -DSDL_STATIC=ON %cmake_build %install %cmake_install rm -rf %{buildroot}/%{_datadir}/licenses/SDL2 %files -n %{libname} %license LICENSE.txt %doc BUGS.txt CREDITS.txt README-SDL.txt %{_libdir}/libSDL2-%{apiver}.so %{_libdir}/libSDL2-%{apiver}.so.%{major} %{_libdir}/libSDL2-%{apiver}.so.%{major}.* %files -n %{develname} %doc README.md WhatsNew.txt %{_bindir}/*-config %{_datadir}/aclocal/%{name}.m4 %{_includedir}/SDL2/ %{_libdir}/cmake/SDL2/ %{_libdir}/libSDL2.so %{_libdir}/pkgconfig/%{name}.pc %files -n %{develsname} %{_libdir}/libSDL2.a %{_libdir}/libSDL2main.a %{_libdir}/libSDL2_test.a