SDL2/SDL2.spec

124 lines
3.4 KiB
RPMSpec
Raw Permalink Normal View History

2023-07-20 17:43:18 +03:00
%define oversion %(echo %{version} |cut -d. -f2- |sed "s/^/0./" |sed "s/\\./00./2")
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
2025-02-08 21:40:52 +00:00
Version: 2.32.0
2022-05-14 13:11:02 +03:00
Release: 1
2013-08-05 18:37:46 +04:00
License: Zlib
Group: System/Libraries
2024-09-16 22:27:37 +00:00
URL: https://www.libsdl.org
#Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
Source0: https://github.com/libsdl-org/SDL/releases/download/release-%{version}/%{name}-%{version}.tar.gz
2021-08-11 10:33:03 +10:00
# Keep major stable, should be 0
Patch1: SDL2-2.0.16-soversion.patch
2016-10-24 17:49:59 +10:00
BuildRequires: cmake
2022-04-04 20:56:36 +03:00
%ifarch %{x86_64} %{ix86} %{armx}
2013-08-06 01:59:15 +11:00
BuildRequires: nas-devel
2022-04-04 20:56:36 +03:00
%endif
2013-08-06 01:59:15 +11:00
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(egl)
2013-08-05 18:37:46 +04:00
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
2022-04-03 11:08:17 +03:00
BuildRequires: pkgconfig(jack)
2013-08-05 18:37:46 +04:00
BuildRequires: pkgconfig(libpulse)
2024-09-16 22:27:37 +00:00
#BuildRequires: pkgconfig(libpipewire-0.3)
2022-04-03 11:08:17 +03:00
BuildRequires: pkgconfig(samplerate)
BuildRequires: pkgconfig(sndio)
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)
2024-09-16 22:27:37 +00:00
BuildRequires: pkgconfig(vulkan)
2024-12-21 10:54:14 +00:00
BuildRequires: pkgconfig(openssl3.3)
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}
2022-04-22 13:37:38 +03:00
%doc README.md README-SDL.txt CREDITS.txt BUGS.txt WhatsNew.txt
2024-09-16 22:27:37 +00:00
%doc LICENSE.txt
2022-10-10 18:41:04 +03:00
%{_libdir}/lib%{name}-%{api}.so.%{major}
%{_libdir}/lib%{name}-%{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}
2022-04-22 13:37:38 +03:00
%doc README.md README-SDL.txt CREDITS.txt BUGS.txt WhatsNew.txt
2024-09-16 22:27:37 +00:00
%doc LICENSE.txt
2013-08-05 18:37:46 +04:00
%{_bindir}/sdl2-config
2022-04-22 13:37:38 +03:00
%{_datadir}/aclocal/sdl2.m4
2022-10-10 18:41:04 +03:00
%{_includedir}/%{name}
%{_libdir}/cmake/%{name}
%{_libdir}/lib%{name}*.a
2013-08-05 18:37:46 +04:00
%{_libdir}/pkgconfig/sdl2.pc
%{_libdir}/*.so
#----------------------------------------------------------------------------
%prep
2020-03-12 00:20:35 +00:00
%autosetup -p1
2013-08-05 18:37:46 +04:00
%build
%cmake \
2024-09-16 22:27:37 +00:00
-DCMAKE_BUILD_TYPE=Release \
2022-04-22 13:37:38 +03:00
-DESD:BOOL=OFF \
-DESD_SHARED:BOOL=OFF \
-DRPATH:BOOL=OFF \
-DSDL_STATIC:BOOL=OFF \
2020-04-22 20:30:53 +00:00
%ifnarch %{ix86} %{x86_64}
2022-04-22 13:37:38 +03:00
-DSSEMATH:BOOL=OFF \
2020-04-22 20:30:53 +00:00
%endif
%ifarch znver1
2022-04-22 13:37:38 +03:00
-DSSEMATH:BOOL=ON \
2020-04-22 20:30:53 +00:00
%endif
2022-04-22 13:37:38 +03:00
-DVIDEO_VULKAN:BOOL=ON
2020-04-22 20:30:53 +00:00
%make_build
2013-08-05 18:37:46 +04:00
%install
2020-04-22 20:30:53 +00:00
%make_install -C build
2022-10-10 18:41:04 +03:00
rm -rf %{buildroot}%{_datadir}/licenses
2024-09-16 22:27:37 +00:00
# fix double slash
sed -i 's|//|/|g' %{buildroot}%{_libdir}/pkgconfig/sdl2.pc