%bcond_without qt5 %define major 1 %define libname %mklibname %{name} %{major} %define devname %mklibname %{name} -d %define oname openal-soft Name: openal Summary: 3D Sound Library Version: 1.21.0 Release: %mkrel 2 License: LGPLv2 Group: Sound/Utilities URL: http://www.openal-soft.org/ Source0: http://www.openal-soft.org/openal-releases/%{oname}-%{version}.tar.bz2 BuildRequires: cmake # For the backends BuildRequires: pkgconfig(alsa) BuildRequires: portaudio-devel BuildRequires: pulseaudio-devel # For the examples and config utility BuildRequires: ffmpeg-devel BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(sndfile) %if %{with qt5} BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Widgets) %endif BuildRequires: sdl2_sound-devel Provides: %{oname} = %{version}-%{release} %description OpenAL is a free 3D-audio library, with a programming interface similar to that of OpenGL. %package -n %{libname} Summary: Main library for OpenAL, a free 3D sound library Group: Sound/Utilities %description -n %{libname} This package contains the library needed to run programs dynamically linked with OpenAL. %package -n %{devname} Summary: Headers for developing programs that will use OpenAL Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: %{oname}-devel = %{version}-%{release} %description -n %{devname} This package contains the headers that programmers will need to develop applications which will use OpenAL, a free 3D audio library. %prep %autosetup -p1 -n %{oname}-%{version} %build %cmake -DALSOFT_INSTALL_CONFIG=ON \ %ifarch %{ix86} -DALSOFT_ENABLE_SSE2_CODEGEN=OFF \ -DALSOFT_CPUEXT_SSE=OFF \ -DALSOFT_CPUEXT_SSE2=OFF \ -DALSOFT_CPUEXT_SSE3=OFF \ -DALSOFT_CPUEXT_SSE4_1=OFF \ -DHAVE_MSSE2_SWITCH=OFF \ -DHAVE_MSSE3_SWITCH=OFF \ -DHAVE_MSSE3_SWITCH=OFF \ -DHAVE_MSSE4_1_SWITCH=OFF \ -DHAVE_MSSE4_1_SWITCH=OFF \ -DHAVE_SSE_INTRINSICS=OFF \ %endif -DSDL_SOUND_INCLUDE_DIR=%{_includir}/SDL2 \ -DSDL_SOUND_LIBRARY=%{_libdir}/libSDL2_sound.so %cmake_build %install %cmake_install install -D -m 0644 alsoftrc.sample %{buildroot}%{_sysconfdir}/%{name}/alsoft.conf %files %dir %{_sysconfdir}/openal %config(noreplace) %{_sysconfdir}/openal/alsoft.conf %{_bindir}/alffplay %{_bindir}/alrecord %{_bindir}/alhrtf %{_bindir}/allatency %{_bindir}/alloopback %{_bindir}/almultireverb %{_bindir}/alplay %{_bindir}/alreverb %{_bindir}/alstream %if %{with qt5} %{_bindir}/alsoft-config %endif %{_bindir}/altonegen %{_bindir}/openal-info %dir %{_datadir}/%{name} %{_datadir}/%{name}/alsoftrc.sample %{_datadir}/%{name}/hrtf/*.mhr %{_datadir}/%{name}/presets/ %files -n %{libname} %{_libdir}/lib%{name}.so.%{major}{,.*} %files -n %{devname} %{_includedir}/AL %{_libdir}/cmake/OpenAL/ %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/lib%{name}.so