mirror of
https://abf.rosa.ru/djam/SDL3.git
synced 2025-02-23 13:52:54 +00:00
117 lines
3.2 KiB
RPMSpec
117 lines
3.2 KiB
RPMSpec
%define oversion %(echo %{version} |cut -d. -f2- |sed "s/^/0./" |sed "s/\\./00./2")
|
|
|
|
%define api 2.0
|
|
%define major 0
|
|
%define libname %mklibname %{name}_ %{api} %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: Simple DirectMedia Layer
|
|
Name: SDL2
|
|
Version: 2.30.6
|
|
Release: 1
|
|
License: Zlib
|
|
Group: System/Libraries
|
|
Url: http://www.libsdl.org
|
|
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
|
# Keep major stable, should be 0
|
|
Patch1: SDL2-2.0.16-soversion.patch
|
|
BuildRequires: cmake
|
|
%ifarch %{x86_64} %{ix86} %{armx}
|
|
BuildRequires: nas-devel
|
|
%endif
|
|
BuildRequires: pkgconfig(alsa)
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
BuildRequires: pkgconfig(egl)
|
|
BuildRequires: pkgconfig(gl)
|
|
BuildRequires: pkgconfig(glu)
|
|
BuildRequires: pkgconfig(jack)
|
|
BuildRequires: pkgconfig(libpulse)
|
|
BuildRequires: pkgconfig(libpipewire-0.3)
|
|
BuildRequires: pkgconfig(samplerate)
|
|
BuildRequires: pkgconfig(sndio)
|
|
BuildRequires: pkgconfig(libusb)
|
|
BuildRequires: pkgconfig(udev)
|
|
BuildRequires: pkgconfig(wayland-client)
|
|
BuildRequires: pkgconfig(wayland-cursor)
|
|
BuildRequires: pkgconfig(wayland-egl)
|
|
BuildRequires: pkgconfig(wayland-protocols)
|
|
BuildRequires: pkgconfig(wayland-scanner)
|
|
BuildRequires: pkgconfig(xcursor)
|
|
BuildRequires: pkgconfig(xext)
|
|
BuildRequires: pkgconfig(xi)
|
|
BuildRequires: pkgconfig(xinerama)
|
|
BuildRequires: pkgconfig(xkbcommon)
|
|
BuildRequires: pkgconfig(xrandr)
|
|
BuildRequires: pkgconfig(xscrnsaver)
|
|
BuildRequires: pkgconfig(xxf86vm)
|
|
BuildRequires: pkgconfig(zlib)
|
|
BuildRequires: vulkan-devel
|
|
|
|
%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.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%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}.
|
|
|
|
%files -n %{libname}
|
|
%doc README.md README-SDL.txt CREDITS.txt BUGS.txt WhatsNew.txt
|
|
%license LICENSE.txt
|
|
%{_libdir}/lib%{name}-%{api}.so.%{major}
|
|
%{_libdir}/lib%{name}-%{api}.so.%{oversion}
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Headers for developing programs that will use %{name}
|
|
Group: Development/C
|
|
Requires: %{libname} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
This package contains the headers that programmers will need to develop
|
|
applications which will use %{name}.
|
|
|
|
%files -n %{devname}
|
|
%doc README.md README-SDL.txt CREDITS.txt BUGS.txt WhatsNew.txt
|
|
%license LICENSE.txt
|
|
%{_bindir}/sdl2-config
|
|
%{_datadir}/aclocal/sdl2.m4
|
|
%{_includedir}/%{name}
|
|
%{_libdir}/cmake/%{name}
|
|
%{_libdir}/lib%{name}*.a
|
|
%{_libdir}/pkgconfig/sdl2.pc
|
|
%{_libdir}/*.so
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%cmake \
|
|
-DESD:BOOL=OFF \
|
|
-DESD_SHARED:BOOL=OFF \
|
|
-DRPATH:BOOL=OFF \
|
|
-DSDL_STATIC:BOOL=OFF \
|
|
%ifnarch %{ix86} %{x86_64}
|
|
-DSSEMATH:BOOL=OFF \
|
|
%endif
|
|
%ifarch znver1
|
|
-DSSEMATH:BOOL=ON \
|
|
%endif
|
|
-DVIDEO_VULKAN:BOOL=ON
|
|
%make_build
|
|
|
|
%install
|
|
%make_install -C build
|
|
|
|
rm -rf %{buildroot}%{_datadir}/licenses
|