diff options
author | CoprDistGit <infra@openeuler.org> | 2025-01-09 14:50:47 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-01-09 14:50:47 +0000 |
commit | 9bf7caa78b999cd1398fe9b1b938b890fc488097 (patch) | |
tree | 9cc05282d0ca279e541f3045c60bc608e640ffce | |
parent | 7a6febb8fe6846ef1a874dd543ef55d02ae853bd (diff) |
automatic import of lpcnetfreedv
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | lpcnetfreedv-libm.patch | 17 | ||||
-rw-r--r-- | lpcnetfreedv.spec | 68 | ||||
-rw-r--r-- | sources | 2 |
4 files changed, 89 insertions, 0 deletions
@@ -0,0 +1,2 @@ +/LPCNet-0.5.tar.gz +/lpcnet_191005_v1.0.tgz diff --git a/lpcnetfreedv-libm.patch b/lpcnetfreedv-libm.patch new file mode 100644 index 0000000..00ec6e0 --- /dev/null +++ b/lpcnetfreedv-libm.patch @@ -0,0 +1,17 @@ +From https://src.fedoraproject.org/rpms/lpcnetfreedv/blob/rawhide/f/lpcnetfreedv-libm.patch + +Index: LPCNet-0.5/src/CMakeLists.txt +=================================================================== +--- LPCNet-0.5.orig/src/CMakeLists.txt ++++ LPCNet-0.5/src/CMakeLists.txt +@@ -42,6 +42,10 @@ endif(LPCNET_C_PROC_FLAGS) + + add_library(lpcnetfreedv SHARED ${lpcnet_freedv_srcs} ${codec2_import_srcs}) + ++if(UNIX) ++target_link_libraries(lpcnetfreedv m) ++endif() ++ + set_target_properties(lpcnetfreedv PROPERTIES + PUBLIC_HEADER lpcnet_freedv.h + VERSION ${LPCNET_VERSION} diff --git a/lpcnetfreedv.spec b/lpcnetfreedv.spec new file mode 100644 index 0000000..4236590 --- /dev/null +++ b/lpcnetfreedv.spec @@ -0,0 +1,68 @@ +# Modified from https://src.fedoraproject.org/rpms/lpcnetfreedv/blob/rawhide/f/lpcnetfreedv.spec + +Name: lpcnetfreedv +Version: 0.5 +Release: 1 +Summary: LPCNet for FreeDV + +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD +URL: https://github.com/drowe67/LPCNet +Source0: https://github.com/drowe67/LPCNet/archive/v%{version}/LPCNet-%{version}.tar.gz +Source1: http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz + +Patch0: lpcnetfreedv-libm.patch + +BuildRequires: cmake gcc + +%description +Experimental version of LPCNet that has been used to develop FreeDV 2020 - a HF +radio Digial Voice mode for over the air experimentation with Neural Net speech +coding. Possibly the first use of Neural Net speech coding in real world +operation. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Development files and tools for LPCNet + +%description devel +%{summary}. + + +%prep +%autosetup -p1 -n LPCNet-%{version} + + +%build +# Add model data archive to the build directory so CMake finds it. +mkdir -p %{_vpath_builddir} +cp %{SOURCE1} ./ + +cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build build + + +%install +DESTDIR="%{buildroot}" cmake --install build + + +%check +# Test scripts incorrectly assume build directory name. Need to fix. +#ctest + + +%files +%license COPYING +%doc README.md +%{_libdir}/lib%{name}.so.%{version} + +%files devel +%{_bindir}/* +%{_includedir}/lpcnet/ +%{_libdir}/cmake/lpcnetfreedv/ +%{_libdir}/lib%{name}.so + + +%changelog +* Fri Nov 22 2024 Suyun <ziyu.oerv@isrc.iscas.ac.cn> - 0.5-1 +- Init package at 0.5 @@ -0,0 +1,2 @@ +5960a002a46e8df245f0294ba3a1c832 LPCNet-0.5.tar.gz +a86894b209a1869b50454fe591f047a1 lpcnet_191005_v1.0.tgz |