diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c063aba --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/cubeb-9caa5b1.tar.gz +/sanitizers-cmake-aab6948.tar.gz diff --git a/cubeb.spec b/cubeb.spec new file mode 100644 index 0000000..d10ddd4 --- /dev/null +++ b/cubeb.spec @@ -0,0 +1,92 @@ +%global commit 9caa5b113a2a4faef8bd31894fc2d762b884a5cf +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global gitdate 20200409 +%global fgittag %{gitdate}.git%{shortcommit} + +%global sanitizerscommit aab6948fa863bc1cbe5d0850bc46b9ef02ed4c1a +%global sanitizersshortcommit %(c=%{sanitizerscommit}; echo ${c:0:7}) + +Name: cubeb +Version: 0.2 +Release: 1%{?fgittag:.%{fgittag}}%{?dist} +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 +License: ISC and BSD and MIT +URL: https://github.com/kinetiknz/cubeb +Source0: https://github.com/kinetiknz/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +#github doesn't support downloading gitsubmodules: +Source1: https://github.com/arsenm/sanitizers-cmake/archive/%{sanitizerscommit}/sanitizers-cmake-%{sanitizersshortcommit}.tar.gz + +BuildRequires: alsa-lib-devel +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: jack-audio-connection-kit-devel +BuildRequires: pulseaudio-libs-devel + +#Taken from the mozilla blog: +#https://blog.mozilla.org/webrtc/firefoxs-audio-backend/ +#Which is licensed CC-BY-SA 3.0 +%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: Development files for cubeb +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development files for cubeb + +%prep +%autosetup -p1 -n %{name}-%{commit} -a 1 +#Clean up Android files +rm -rf src/android + +#Link the sanitizer cmake files into the expected location +ln -s ../../sanitizers-cmake-%{sanitizerscommit}/cmake cmake/sanitizers-cmake + +#Clean up the README.md, we don't need building information: +sed -i -e "/^\[!/d" -e "/INSTALL.md/d" README.md + +#Upstream aims to distribute statically, so it doesn't set a SONAME +#We can define it ourselves to allow dynamic linking: +echo "set_target_properties(%{name} PROPERTIES SOVERSION 0)" >> CMakeLists.txt + +%build +%cmake . -DBUILD_TESTS=OFF +%make_build + +%install +%make_install + +%files +%doc README.md +%license LICENSE +%{_libdir}/libcubeb.so.* + +%files devel +%{_libdir}/libcubeb.so +%{_bindir}/%{name}-test +%{_includedir}/%{name} +%{_libdir}/cmake/%{name} + +%changelog +* Mon Apr 20 2020 Jeremy Newton +- Add breakdown for a few BSD-licensed files +- Clean up android files + +* Mon Apr 20 2020 Jeremy Newton - 0.2-1.20200409.git9caa5b1 +- Initial Package diff --git a/sources b/sources new file mode 100644 index 0000000..17a29a4 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (cubeb-9caa5b1.tar.gz) = d9278da30560e4d25811bdf13bd221ebfd264f80db98994bcc6a64a45a33d6c1db440713535185572849b62273d4b1c033dc5cb4c8df40f8b7eae3ba76281c51 +SHA512 (sanitizers-cmake-aab6948.tar.gz) = fda03b67b1c10b30e806d479589bc8a2be8405571861fea5535ec9bd8a389ab3c074c0ab1d1e6904b7cd8450291a3255b4a7dc5c55ca865d7745d2df9d62d590