# 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 %global commit b00e4a318fc7e4074b67f75dbb22373e1e07c56b %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20260116 %define major 3 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define staticname %mklibname %{name} -d -s Name: sdl%{major}_sound Version: 3.0.0 Release: %mkrel %{?commit:0.git%{?date:%{date}}%{?shortcommit:+%{?shortcommit:%{shortcommit}}}.}1 Summary: An abstract SDL3 sound-file decoder License: zlib Group: System/Libraries Url: https://www.icculus.org/SDL_sound/ %if 0%{?commit:1} Source0: https://github.com/icculus/SDL_sound/archive/%{commit}.tar.gz#/SDL_sound-%{commit}.tar.gz %else Source0: https://github.com/icculus/SDL_sound/releases/download/v%{version}/SDL%{major}_sound-%{version}.tar.gz %endif BuildRequires: cmake BuildRequires: gcc BuildRequires: doxygen BuildRequires: pkgconfig(sdl3) BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(libmikmod) BuildRequires: pkgconfig(libmodplug) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(physfs) Conflicts: sdl2_sound < 2.0.6 %description SDL%{major}_sound is SDL_sound but with a SDL%{major} backend. This is a library that handles the decoding of several popular sound file formats, such as .WAV and .MP3. It is meant to make the programmer's sound playback tasks simpler. The programmer gives SDL%{major}_sound a file-name, or feeds it data directly from one of many sources, and then reads the decoded waveform data back at her leisure. If resource constraints are a concern, SDL%{major}_sound can process sound data in programmer-specified blocks. Alternately, SDL%{major}_sound can decode a whole sound file and hand back a single pointer to the whole waveform. SDL%{major}_sound can also handle sample rate, audio format, and channel conversion on-the-fly and behind-the-scenes. %package -n %{libname} Summary: SDL%{major}_sound main library Group: System/Libraries %description -n %{libname} SDL%{major}_sound main library. %package -n %{develname} Summary: Development files for SDL%{major}_sound applications Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: SDL%{major}_sound-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} Development files for SDL%{major}_sound applications. %package -n %{staticname} Summary: Static development files for SDL%{major}_sound libraries Group: Development/C Requires: %{develname} = %{version}-%{release} Provides: %{name}-static-devel = %{version}-%{release} %description -n %{staticname} Static development files for SDL%{major}_sound libraries. %prep %autosetup -p1 -n %{?commit:SDL_sound-%{commit}}%{!?commit:SDL_sound-%{version}} %build %cmake -DCMAKE_STATIC_LIBS:BOOL=ON \ -DCMAKE_SHARED_LIBS:BOOL=ON \ -DSDLSOUND_INSTALL_MAN=ON \ -DSDLSOUND_DECODER_MIDI:BOOL=ON %cmake_build doxygen docs/Doxyfile %install %cmake_install %files %doc docs/CREDITS.txt %{_bindir}/* %files -n %{libname} %doc docs/CREDITS.txt README.md %{_libdir}/libSDL%{major}_sound.so.* %{_licensedir}/SDL%{major}_sound/LICENSE.txt %files -n %{develname} %doc docs/html/ %{_libdir}/lib*.so %{_includedir}/SDL%{major}_sound/SDL_sound.h %{_libdir}/cmake/SDL%{major}_sound/ %{_libdir}/pkgconfig/sdl%{major}-sound.pc %{_mandir}/man3/*.3* %files -n %{staticname} %{_libdir}/lib*.a