commit ec78c2e670766a52b4bc524e7ea8a1a7b4c245af
Author: Ben Rosser <rosser.bjr(a)gmail.com>
Date: Fri Sep 30 16:09:39 2016 -0400
Initial import (#4222).
.gitignore | 1 +
45.patch | 39 ++++++++++++++++++++
cAudio-freeworld.spec | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 141 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..99db653 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cAudio-2.3.1.tar.gz
diff --git a/45.patch b/45.patch
new file mode 100644
index 0000000..ac74a37
--- /dev/null
+++ b/45.patch
@@ -0,0 +1,39 @@
+From cf32f714b154b04203113eea2fd9c0741e79dcf6 Mon Sep 17 00:00:00 2001
+From: Ben Rosser <rosser.bjr(a)gmail.com>
+Date: Mon, 15 Aug 2016 19:43:28 -0400
+Subject: [PATCH] Also version the .so files of the plugins.
+
+Use the same versions as current cAudio, for now.
+---
+ Plugins/EAXLegacyPreset/CMakeLists.txt | 5 ++++-
+ Plugins/mp3Decoder/CMakeLists.txt | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Plugins/EAXLegacyPreset/CMakeLists.txt
b/Plugins/EAXLegacyPreset/CMakeLists.txt
+index 1ca4ec4..e15b259 100644
+--- a/Plugins/EAXLegacyPreset/CMakeLists.txt
++++ b/Plugins/EAXLegacyPreset/CMakeLists.txt
+@@ -25,4 +25,7 @@ if(${CAUDIO_STATIC})
+ ADD_DEFINITIONS(-DCAUDIO_STATIC_LIB)
+ endif()
+
+-install_all_targets(EAXLegacyPreset)
+\ No newline at end of file
++set_property(TARGET EAXLegacyPreset PROPERTY VERSION "2.3.0")
++set_property(TARGET EAXLegacyPreset PROPERTY SOVERSION 2 )
++
++install_all_targets(EAXLegacyPreset)
+diff --git a/Plugins/mp3Decoder/CMakeLists.txt b/Plugins/mp3Decoder/CMakeLists.txt
+index 8d16696..a621a98 100644
+--- a/Plugins/mp3Decoder/CMakeLists.txt
++++ b/Plugins/mp3Decoder/CMakeLists.txt
+@@ -25,4 +25,7 @@ if(${CAUDIO_STATIC})
+ ADD_DEFINITIONS(-DCAUDIO_STATIC_LIB)
+ endif()
+
+-install_all_targets(cAp_mp3Decoder)
+\ No newline at end of file
++set_property(TARGET cAp_mp3Decoder PROPERTY VERSION "2.3.0")
++set_property(TARGET cAp_mp3Decoder PROPERTY SOVERSION 2 )
++
++install_all_targets(cAp_mp3Decoder)
diff --git a/cAudio-freeworld.spec b/cAudio-freeworld.spec
new file mode 100644
index 0000000..81f87be
--- /dev/null
+++ b/cAudio-freeworld.spec
@@ -0,0 +1,100 @@
+# This is the upstream-preferred name of the project
+Name: cAudio-freeworld
+Version: 2.3.1
+Release: 2%{?dist}
+Summary: MP3 support for cAudio
+
+# cAudio-2.3.1/Plugins/mp3Decoder/mpaudec/{bits.c,mpaudec.c} are under LGPLv2+
+# Everything else is zlib
+License: zlib and LGPLv2+
+
+URL:
https://github.com/R4stl1n/cAudio/
+Source0:
https://github.com/R4stl1n/cAudio/archive/%{version}/cAudio-%{version}.ta...
+
+# Patch to version the .so names of the plugins.
+# Was submitted upstream and merged (see
https://github.com/R4stl1n/cAudio/pull/45)
+Patch0:
https://patch-diff.githubusercontent.com/raw/R4stl1n/cAudio/pull/45.patch
+
+# We need cmake and a compiler, obviously.
+BuildRequires: gcc-c++, cmake
+
+BuildRequires: libogg-devel, libvorbis-devel, openal-soft-devel
+
+BuildRequires: doxygen, graphviz
+
+# Package must depend on cAudio.
+Requires: cAudio%{?_isa}
+
+%description
+cAudio is a 3D audio engine based on OpenAL. This package contains
+the MP3 decoder plugin for cAudio, which is based on code from ffmpeg.
+
+%package devel
+
+Summary: Development headers for cAudio-freeworld
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+
+Development files and library headers for cAudio-freeworld.
+
+%prep
+%autosetup -p1 -n cAudio-%{version}
+
+# Remove bundled dependencies
+rm -rf Dependencies*
+
+# Set /lib manually because this software has interesting ideas about how to use cmake
+sed 's,/lib,/%{_lib},g' -i CMakeLists.txt
+sed 's,LIBRARY DESTINATION lib,LIBRARY DESTINATION %{_lib},g' -i
CMake/InstallDependencies.cmake
+
+# Fix some spurious executable perm errors.
+chmod -x cAudio/Headers/cAudioStaticSource.h
+chmod -x cAudio/Headers/cOpenALUtil.h
+
+%build
+mkdir build
+cd build
+
+export CXXFLAGS="%{optflags} -Wl,--as-needed"
+
+# There is a MPEG decoder plugin that uses code derived from ffmpeg; this can't be
built in Fedora.
+# There are also C# bindings. They do not compile:
https://github.com/R4stl1n/cAudio/issues/42
+# The EAX legacy preset plugin builds and works fine. However, the .so is not currently
versioned.
+%cmake .. -DCAUDIO_SYSTEM_OGG=TRUE -DCAUDIO_BUILD_MP3DECODER_PLUGIN=TRUE
-DCAUDIO_BUILD_SAMPLES=FALSE
+# -DCAUDIO_BUILD_EAX_PLUGIN=TRUE reenable when
https://github.com/R4stl1n/cAudio/pull/45
merged
+
+make %{?_smp_mflags}
+
+# We don't need to build the documentation for the RPM Fusion version.
+
+%install
+cd build
+make install DESTDIR=%{buildroot}
+
+# Remove the installed libcAudio.so*; w
+rm -rf %{buildroot}%{_libdir}/libcAudio.so*
+
+# Remove the installed header files, too.
+rm -rf %{buildroot}%{_includedir}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/libcAp_mp3Decoder.so.2
+%{_libdir}/libcAp_mp3Decoder.so.2.3.0
+%license License.txt
+%doc README.md
+
+%files devel
+%{_libdir}/libcAp_mp3Decoder.so
+
+%changelog
+* Sat Sep 17 2016 Ben Rosser <rosser.bjr(a)gmail.com> 2.3.1-2
+- Update license tag to zlib and LGPLv2+
+
+* Tue Aug 16 2016 Ben Rosser <rosser.bjr(a)gmail.com> 2.3.1-1
+- Initial package of cAudio-freeworld, containing only MP3 decoder.
+- Based off of package and spec for cAudio in Fedora.
diff --git a/sources b/sources
index e69de29..c63a714 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9807dfc50f84f7c7e3487cdc5d424158 cAudio-2.3.1.tar.gz