SDL2/SDL2.spec

117 lines
3.1 KiB
RPMSpec
Raw Normal View History

2021-08-11 10:33:03 +10:00
%define oversion 0.16.0
2016-10-24 17:49:59 +10:00
2014-06-08 21:22:29 +11:00
%define api 2.0
%define major 0
2014-06-08 21:22:29 +11:00
%define libname %mklibname %{name}_ %{api} %{major}
%define devname %mklibname %{name} -d
2013-08-05 18:37:46 +04:00
Summary: Simple DirectMedia Layer
Name: SDL2
2021-08-11 10:33:03 +10:00
Version: 2.0.16
2019-08-30 21:56:42 +10:00
Release: 1
2013-08-05 18:37:46 +04:00
License: Zlib
Group: System/Libraries
Url: http://www.libsdl.org/
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
2020-04-22 20:30:53 +00:00
Source1: FindSDL2.cmake
2014-06-08 21:22:29 +11:00
Patch0: SDL2-2.0.3-cmake.patch
2021-08-11 10:33:03 +10:00
# Keep major stable, should be 0
Patch1: SDL2-2.0.16-soversion.patch
# Avoid /usr/lib6464
Patch2: SDL2-2.0.16-libdir.patch
2016-10-24 17:49:59 +10:00
BuildRequires: cmake
2013-08-06 01:59:15 +11:00
BuildRequires: nas-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(egl)
2013-08-05 18:37:46 +04:00
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(libpulse)
2013-08-06 02:24:44 +11:00
BuildRequires: pkgconfig(libusb)
2013-08-06 01:59:15 +11:00
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-cursor)
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-protocols)
BuildRequires: pkgconfig(wayland-scanner)
2013-08-06 01:59:15 +11:00
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xkbcommon)
2013-08-05 18:37:46 +04:00
BuildRequires: pkgconfig(xrandr)
2013-08-06 01:59:15 +11:00
BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xxf86vm)
2013-08-05 18:37:46 +04:00
BuildRequires: pkgconfig(zlib)
2020-04-22 20:30:53 +00:00
BuildRequires: vulkan-devel
2013-08-05 18:37:46 +04:00
%description
This is the Simple DirectMedia Layer, a generic API that provides low level
access to audio, keyboard, mouse, and display framebuffer across multiple
platforms.
2016-10-24 17:49:59 +10:00
#----------------------------------------------------------------------------
%package -n %{libname}
2013-08-05 18:37:46 +04:00
Summary: Main library for %{name}
Group: System/Libraries
2016-10-24 17:49:59 +10:00
%description -n %{libname}
2013-08-05 18:37:46 +04:00
This package contains the library needed to run programs dynamically
linked with %{name}.
%files -n %{libname}
2021-08-11 10:33:03 +10:00
%doc README.md README-SDL.txt CREDITS.txt LICENSE.txt BUGS.txt WhatsNew.txt
2016-10-24 17:49:59 +10:00
%{_libdir}/libSDL2-%{api}.so.%{major}
%{_libdir}/libSDL2-%{api}.so.%{oversion}
2013-08-05 18:37:46 +04:00
#----------------------------------------------------------------------------
2016-10-24 17:49:59 +10:00
%package -n %{devname}
2013-08-05 18:37:46 +04:00
Summary: Headers for developing programs that will use %{name}
Group: Development/C
2016-10-24 17:49:59 +10:00
Requires: %{libname} = %{EVRD}
Provides: %{name}-devel = %{EVRD}
2013-08-05 18:37:46 +04:00
2016-10-24 17:49:59 +10:00
%description -n %{devname}
2013-08-05 18:37:46 +04:00
This package contains the headers that programmers will need to develop
applications which will use %{name}.
%files -n %{devname}
2021-08-11 10:33:03 +10:00
%doc README.md README-SDL.txt CREDITS.txt LICENSE.txt BUGS.txt WhatsNew.txt
2013-08-05 18:37:46 +04:00
%{_bindir}/sdl2-config
2021-08-11 10:33:03 +10:00
%dir %{_libdir}/cmake/SDL2/
%{_libdir}/cmake/SDL2/*
2013-08-05 18:37:46 +04:00
%{_libdir}/pkgconfig/sdl2.pc
%{_libdir}/*.so
%{_libdir}/libSDL2main.a
2020-04-22 20:30:53 +00:00
%{_datadir}/cmake/Modules/FindSDL2.cmake
2013-08-05 18:37:46 +04:00
%dir %{_includedir}/SDL2
%{_includedir}/SDL2/*.h
%{_datadir}/aclocal/sdl2.m4
#----------------------------------------------------------------------------
%prep
2020-03-12 00:20:35 +00:00
%autosetup -p1
2013-08-05 18:37:46 +04:00
%build
%cmake \
2020-04-22 20:30:53 +00:00
%ifnarch %{ix86} %{x86_64}
-DSSEMATH:BOOL=OFF \
%endif
%ifarch znver1
-DSSEMATH:BOOL=ON \
%endif
-DESD:BOOL=OFF \
-DESD_SHARED:BOOL=OFF \
-DSDL_STATIC:BOOL=OFF \
-DVIDEO_VULKAN:BOOL=ON \
-DRPATH:BOOL=OFF
%make_build
2013-08-05 18:37:46 +04:00
%install
2020-04-22 20:30:53 +00:00
%make_install -C build
install -m644 %{SOURCE1} -D %{buildroot}%{_datadir}/cmake/Modules/FindSDL2.cmake