# 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