%define apiver 2.0 %define major 0 %define libname %mklibname sdl %{apiver} %{major} %define develname %mklibname sdl %{apiver} -d %define develsname %mklibname sdl %{apiver} -d -s Name: sdl2 Summary: Simple DirectMedia Layer 2 Version: 2.0.6 Release: %mkrel 3 License: Zlib Group: System/Libraries URL: http://wiki.libsdl.org/FrontPage Source0: http://www.libsdl.org/release/SDL2-%{version}.tar.gz # Upstream patch for CVE-2017-2888, can be removed for 2.0.7 Patch0: SDL2-2.0.6-CVE-2017-2888.patch BuildRequires: doxygen BuildRequires: libnas-devel BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(libpulse-simple) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xxf86vm) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(xkbcommon) %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} Obsoletes: %{_lib}sdl-devel < 2.0.0-2 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}. %package docs Summary: Documentation for Simple DirectMedia Layer 2 (SDL2) Group: Documentation BuildArch: noarch %description docs This package contains the generated API documentation for the SDL2 library. %prep %autosetup -p1 -n SDL2-%{version} %build %configure2_5x \ --enable-sdl-dlopen \ --enable-alsa-shared \ --enable-esd-shared \ --enable-pulseaudio-shared \ --enable-arts-shared \ --enable-nas-shared \ --enable-sndio-shared \ --enable-x11-shared \ --enable-directfb-shared \ --enable-fusionsound-shared \ --enable-video-wayland \ --disable-rpath \ #End %make_build # generate docs pushd include doxygen -g doxygen -w html headerFile footerFile styleSheetFile doxyfile doxygen popd %install %make_install %files -n %{libname} %doc README-SDL.txt README.txt %doc CREDITS.txt COPYING.txt %doc BUGS.txt TODO.txt WhatsNew.txt %{_libdir}/libSDL2-%{apiver}.so.%{major} %{_libdir}/libSDL2-%{apiver}.so.%{major}.* %files -n %{develname} %{_bindir}/*-config %{_libdir}/lib*.so %{_libdir}/cmake/SDL2/ %{_libdir}/pkgconfig/* %{_datadir}/aclocal/* %{_includedir}/SDL2/*.h %files -n %{develsname} %{_libdir}/*.la %{_libdir}/*.a %files docs %doc include/html