File cubeb.spec of Package cubeb
Name: cubeb
Version: 0.2
Release: 1
Summary: A cross platform audio library
#cubeb is ISC, sanitizers-cmake is MIT
#excluding the following files which are BSD 3-clause:
#/src/speex/arch.h
#/src/speex/fixed_generic.h
#/src/speex/resample.c
#/src/speex/resample_neon.h
#/src/speex/resample_sse.h
#/src/speex/speex_resampler.h
#/src/speex/stack_alloc.h
# Automatically converted from old format: ISC and BSD and MIT - review is highly recommended.
License: ISC AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT
URL: https://github.com/mozilla/cubeb
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(alsa)
BuildRequires: cmake
BuildRequires: pkg-config
BuildRequires: doxygen
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(libpulse)
%description
Cubeb is a cross-platform library, written in C/C++, that was created and has
been maintained by the Firefox Media Team.
The role of the library is to communicate with audio devices and to provide
audio input and/or output.
%package devel
Summary: A cross platform audio library
Provides: %{name}-static = %{version}-%{release}
%description devel
Cubeb is a cross-platform library, written in C/C++, that was created and has
been maintained by the Firefox Media Team.
The role of the library is to communicate with audio devices and to provide
audio input and/or output.
%prep
%autosetup -p1 -n %{name}-%{version}
#Clean up Android files
rm -rf src/android
#Clean up the README.md, we don't need building information:
sed -i -e "/^\[!/d" -e "/INSTALL.md/d" README.md
%build
export CFLAGS='-O2 -Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -flto=auto -ffat-lto-objects'
export CXXFLAGS="$CFLAGS"
%cmake . -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON -DUSE_SANITIZERS=OFF
%cmake_build
%install
%cmake_install
%check
%files devel
%doc README.md
%license LICENSE
%{_libdir}/libcubeb.a
%{_bindir}/%{name}-test
%{_includedir}/%{name}
%{_libdir}/cmake/%{name}
%{_docdir}/%{name}
%{_libdir}/pkgconfig/lib%{name}.pc
%changelog