diff --git a/codec2-1.2.0.tar.gz b/codec2-1.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d5674e23b6c22cf7e094207933e09c85d70d0491 Binary files /dev/null and b/codec2-1.2.0.tar.gz differ diff --git a/codec2.spec b/codec2.spec new file mode 100644 index 0000000000000000000000000000000000000000..6392c716ccfd4e19c062cf82aa936cad743468b9 --- /dev/null +++ b/codec2.spec @@ -0,0 +1,92 @@ +# Modified from https://src.fedoraproject.org/rpms/codec2/blob/rawhide/f/codec2.spec + +Name: codec2 +Version: 1.2.0 +Release: 1 +Summary: Next-Generation Digital Voice for Two-Way Radio +License: LGPL-2.1-only + +URL: http://rowetel.com/codec2.html +Source0: https://github.com/drowe67/codec2/archive/%{version}/%{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: gcc gcc-c++ +BuildRequires: libsamplerate-devel +BuildRequires: lpcnetfreedv-devel +BuildRequires: speex-devel +BuildRequires: speexdsp-devel + + +%description +Codec 2 is an open source (LGPL licensed) speech codec for 2400 bit/s +and below. This is the runtime library package. + + +%package devel +Summary: Development files for Codec 2 +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Codec 2 is an open source (LGPL licensed) speech codec for 2400 bit/s +and below. This package contains the development files required to +compile programs that use codec2. + + +%package devel-examples +Summary: Example code for Codec 2 +Requires: %{name}-devel = %{version}-%{release} +BuildArch: noarch + +%description devel-examples +Example code for Codec 2 + + +%prep +%autosetup -p1 + + +%build +cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DLPCNET=ON \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -B build + +cmake --build build + + +%install +DESTDIR="%{buildroot}" cmake --install build + +# Create and install pkgconfig file +mkdir -p %{buildroot}%{_libdir}/pkgconfig +cat > %{buildroot}%{_libdir}/pkgconfig/codec2.pc << EOF +prefix=%{_prefix} +exec_prefix=\${prefix} +includedir=\${prefix}/include/%{name} +libdir=\${exec_prefix}/%{_lib} + +Name: codec2 +Description: Next-Generation Digital Voice for Two-Way Radio +Version: 1.2.0 +Cflags: -I\${includedir} +Libs: -L\${libdir} -l%{name} +EOF + + +%ldconfig_scriptlets + + +%files +%license COPYING +%doc README.md +%{_libdir}/*.so.* + +%files devel +%{_includedir}/%{name}/ +%{_libdir}/*.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/cmake/%{name}/ + +%changelog +* Fri Nov 22 2024 Suyun - 1.2.0-1 +- Init package at 1.2.0 diff --git a/codec2.src.rpm b/codec2.src.rpm new file mode 100644 index 0000000000000000000000000000000000000000..885e212f09ffcd9b777fdda97e0a2bc340a4d631 Binary files /dev/null and b/codec2.src.rpm differ diff --git a/files_in_srpm.txt b/files_in_srpm.txt new file mode 100644 index 0000000000000000000000000000000000000000..ca44bde4f78720b487ce177a1b9e210cb5a35c25 --- /dev/null +++ b/files_in_srpm.txt @@ -0,0 +1,2 @@ +codec2-1.2.0.tar.gz +codec2.spec