mirror of
https://abf.rosa.ru/djam/SDL3.git
synced 2025-02-23 13:52:54 +00:00
135 lines
No EOL
3.4 KiB
RPMSpec
135 lines
No EOL
3.4 KiB
RPMSpec
%define oversion %(echo %{version} |cut -d. -f2- |sed "s/^/0./" |sed "s/\\./00./2")
|
|
|
|
%define api 3.0
|
|
%define major 0
|
|
%define libname %mklibname %{name}_ %{api} %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: Simple DirectMedia Layer
|
|
Name: SDL3
|
|
Version: 3.2.2
|
|
Release: 1
|
|
License: Zlib
|
|
Group: System/Libraries
|
|
URL: https://www.libsdl.org
|
|
Source0: https://github.com/libsdl-org/SDL/releases/download/release-%{version}/%{name}-%{version}.tar.gz
|
|
# Keep major stable, should be 0
|
|
BuildRequires: cmake
|
|
BuildRequires: xz
|
|
%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(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: pkgconfig(vulkan)
|
|
BuildRequires: pkgconfig(openssl3.3)
|
|
|
|
%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 BUGS.txt WhatsNew.txt
|
|
%doc LICENSE.txt
|
|
%{_libdir}/lib%{name}.so.*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%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 BUGS.txt WhatsNew.txt
|
|
%doc LICENSE.txt
|
|
%{_includedir}/%{name}
|
|
%{_libdir}/cmake/%{name}
|
|
%{_libdir}/lib%{name}*.a
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_libdir}/*.so
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
cat > sdl3.pc << EOF
|
|
prefix=%{_prefix}
|
|
exec_prefix=${prefix}
|
|
libdir=%{_libdir}
|
|
includedir=%{_includedir}
|
|
|
|
Name: sdl3
|
|
Description: %{summary}
|
|
URL: %{url}
|
|
Version: %{version}
|
|
Libs: -lSDL3
|
|
EOF
|
|
|
|
|
|
%build
|
|
%cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-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
|
|
|
|
|
|
# erase rpath in pkgconfig
|
|
rm -f %{buildroot}%{_libdir}/pkgconfig/sdl3.pc
|
|
|
|
install -Dm0644 sdl3.pc %{buildroot}%{_libdir}/pkgconfig/sdl3.pc |