# The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define major 0 %define apiver 3.0 %define libname %mklibname %{name} %{apiver} %{major} %define develname %mklibname %{name} -d %define sname SDL3_mixer Summary: Simple DirectMedia Layer 3 - mixer Name: sdl3_mixer Version: 3.2.0 Release: %mkrel 1 License: zlib Group: System/Libraries URL: https://www.libsdl.org/projects/SDL_mixer/ Source0: https://www.libsdl.org/projects/SDL_mixer/release/%{sname}-%{version}.tar.gz BuildRequires: cmake >= 3.16 BuildRequires: pkgconfig(libmpg123) BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(fluidsynth) >= 2.2.0 BuildRequires: pkgconfig(libgme) BuildRequires: pkgconfig(libmodplug) BuildRequires: pkgconfig(libxmp) BuildRequires: pkgconfig(opusfile) BuildRequires: pkgconfig(sdl3) >= 3.4.0 BuildRequires: pkgconfig(vorbisfile) BuildRequires: pkgconfig(wavpack) BuildRequires: pkgconfig(zlib) %description SDL3_mixer is a sample multi-channel audio mixer library. It supports any number of simultaneously playing channels of 16 bit stereo audio, plus a single channel of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3 libraries. %package -n %{libname} Summary: Main library for %{name} Group: System/Libraries Provides: %{name} = %{version}-%{release} %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 will use %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}%{apiver}-devel = %{version}-%{release} %description -n %{develname} This package contains the headers that programmers will need to develop applications which will use %{name}. %package -n %{name}-player Summary: Examples and tests for%{name} Group: System/Libraries Requires: %{libname} = %{version}-%{release} %description -n %{name}-player This package contains binaries to test the associated library. %prep %autosetup -p1 -n %{sname}-%{version} %build %cmake -DSDLMIXER_MP3_MPG123=ON \ -DSDLMIXER_MOD_XMP=ON -DSDLMIXER_MIDI_FLUIDSYNTH=ON \ -DSDLMIXER_WAVE_ENABLED=ON -DSDLMIXER_AIFF_ENABLED=ON \ -DSDLMIXER_VOC_ENABLED=ON -DSDLMIXER_AU_ENABLED=ON \ -DSDLMIXER_WAVPACK_ENABLED=ON \ -DSDLMIXER_OPUS_ENABLED=ON -DSDLMIXER_OPUS_SHARED=OFF \ -DSDLMIXER_SAMPLES=ON %cmake_build %install %cmake_install %files -n %{libname} %doc INSTALL.md %{_licensedir}/%{sname}/LICENSE.txt %{_libdir}/lib*.so.%{major}{,.*} %files -n %{develname} %doc README.md INSTALL.md docs/* %{_libdir}/lib*.so %{_includedir}/%{sname}/* %{_libdir}/pkgconfig/sdl3-mixer.pc %{_libdir}/cmake/%{sname}/ %files -n %{name}-player %doc README.md %{_libexecdir}/installed-examples/%{sname} %{_libexecdir}/installed-tests/%{sname}