%define major 2 %define libname %mklibname %{name} %{major} %define develname %mklibname -d %{name} %define oname SDL_sound-default Name: SDL2_sound # see cmake file #set(SDLSOUND_VERSION 2.0.0) Version: 2.0.4 Release: 1 Summary: An abstract SDL2 sound-file decoder License: zlib Group: System/Libraries URL: https://icculus.org/SDL_sound Source0: https://github.com/icculus/SDL_sound/releases/download/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(libmikmod) BuildRequires: pkgconfig(libmodplug) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(speex) BuildRequires: physfs-devel Patch0: rosa-SDL2_sound.patch %description SDL2_sound is SDL_sound but with a SDL2 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 SDL2_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, SDL2_sound can process sound data in programmer-specified blocks. Alternately, SDL2_sound can decode a whole sound file and hand back a single pointer to the whole waveform. SDL2_sound can also handle sample rate, audio format, and channel conversion on-the-fly and behind-the-scenes. %files %doc README.md LICENSE.txt %{_bindir}/* #-------------------------------------------------------------- %package -n %{libname} Summary: SDL2_sound main library Group: System/Libraries %description -n %{libname} %{summary}. %files -n %{libname} %doc README.md LICENSE.txt %{_libdir}/libSDL2_sound.so.%{major} %{_libdir}/libSDL2_sound.so.%{major}.* #-------------------------------------------------------------- %package -n %{develname} Summary: Development files for SDL2_sound applications Group: Development/C Requires: %{libname} = %{EVRD} Provides: SDL2_sound-devel = %{EVRD} Provides: lib%{name}-devel = %{EVRD} Provides: %{name}-devel = %{EVRD} %description -n %{develname} %{summary}. %files -n %{develname} %doc docs %{_libdir}/lib*.so %{_includedir}/SDL2/SDL_sound.h %{_libdir}/cmake/SDL2_sound/*.cmake %{_libdir}/pkgconfig/SDL2_sound.pc #------------------------------------------------------------- %prep %setup -q #patch0 -p1 %build export CFLAGS="%{optflags} -lm -lSDL2" %cmake %make %install %makeinstall_std -C build # remove static stuff find %{buildroot}%{_libdir} -name '*.la' -o -name "*.a" -exec rm {} \;