%define sname SDL3_mixer %define major 0 %define apiver 3.0 # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %define libname %sname %define develname %sname-devel %define playername %sname-player %else %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define playername %{name}-player %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif Summary: An audio mixer that supports various file formats for Simple Directmedia Layer. Name: sdl3_mixer Version: 3.2.4 Release: %mkrel 5 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: cmake(SDL3) >= 3.4.0 BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(fluidsynth) >= 2.2.0 BuildRequires: pkgconfig(libgme) BuildRequires: pkgconfig(libmodplug) BuildRequires: pkgconfig(libmpg123) BuildRequires: pkgconfig(libxmp) BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(opusfile) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(vorbisfile) BuildRequires: pkgconfig(wavpack) BuildRequires: pkgconfig(zlib) %define _description %{expand: SDL3_mixer is an audio management library. It provides decoding of many popular audio file formats, mixing, various DSP processing effects and positional audio. Audio data can be preloaded, or streamed on-the-fly into the mixer. SDL3_mixer supports multiple audio devices, and can even mix to a memory buffer instead of feeding audio hardware in real time. It is a complete redesign, rewritten almost from scratch to address deficiencies in SDL2_mixer. } %description %{_description} %package -n %{libname} Summary: %{summary} Group: System/Libraries Provides: %{name} = %{version}-%{release} Obsoletes: %{mklibname %{name} %{apiver} %{major}} <= %{version}-%{release} %description -n %{libname} %{_description} %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: %{sname}-devel = %{version}-%{release} # The proposed Fedora SPEC file puts these files in a doc package but Mageia # doesn't. See https://bugzilla.redhat.com/show_bug.cgi?id=2454358. # So remove the doc package to prevent conflicts. Obsoletes: %{sname}-doc <= %{version}-%{release} Provides: %{sname}-doc = %{version}-%{release} %description -n %{develname} This package contains the headers that programmers will need to develop applications which will use %{sname}. %package -n %{playername} Summary: Examples and tests for%{name} Group: System/Libraries Requires: %{libname} = %{version}-%{release} %description -n %{playername} This package contains binaries to test %{sname}. %prep %autosetup -p1 -n %{sname}-%{version} %conf %cmake \ -DSDLMIXER_AIFF=ON \ -DSDLMIXER_AU=ON \ -DSDLMIXER_FLAC=ON \ -DSDLMIXER_GME=ON \ -DSDLMIXER_MIDI=ON \ -DSDLMIXER_MOD=ON \ -DSDLMIXER_MOD_XMP=ON \ -DSDLMIXER_MOD_XMP_SHARED=ON %dnl Errors in find_package() without this. \ -DSDLMIXER_MP3=ON \ -DSDLMIXER_OPUS=ON \ -DSDLMIXER_VOC=ON \ -DSDLMIXER_WAVE=ON \ -DSDLMIXER_WAVPACK=ON \ -DSDLMIXER_DEPS_SHARED=OFF \ -DSDLMIXER_VENDORED=OFF \ -DSDLMIXER_EXAMPLES_INSTALL=ON \ -DSDLMIXER_TESTS_INSTALL=ON \ -DSDLMIXER_INSTALL_MAN=ON \ %dnl Use system libraries rather than bundled -DSDLMIXER_FLAC_LIBFLAC=ON -DSDLMIXER_FLAC_DRFLAC=OFF \ -DSDLMIXER_MIDI_FLUIDSYNTH=ON -DSDLMIXER_MIDI_TIMIDITY=OFF %dnl Also avoids licensing and possible security problems with the discontinued timidity \ -DSDLMIXER_MP3_MPG123=ON -DSDLMIXER_MP3_DRMP3=OFF \ -DSDLMIXER_VORBIS_VORBISFILE=ON -DSDLMIXER_VORBIS_STB=OFF %build %cmake_build %install %cmake_install %files -n %{libname} %doc README.md 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}/ %{_mandir}/man3/ %files -n %{playername} %doc README.md %{_libexecdir}/installed-examples/%{sname} %{_libexecdir}/installed-tests/%{sname}