File mingw64-ilbc.spec of Package mingw64-ilbc

#
# spec file for package mingw64-ilbc
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define realname ilbc
%define libname mingw64-lib%{realname}
Name:           mingw64-%{realname}
Summary:        Internet Low Bitrate Codec
License:        BSD-3-Clause
Group:          System/Libraries
Version:        3.0.4
Release:        0
URL:            https://github.com/TimothyGu/libilbc
Source:         https://github.com/TimothyGu/libilbc/archive/refs/tags/v%{version}.tar.gz#/libilbc-%{version}.tar.gz
Patch0:         ilbc-cmake-cflags.patch
Patch1:         ilbc-cmake-cpp17.patch
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-abseil-cpp-devel
BuildRequires:  mingw64-cross-cmake
%_mingw64_package_header_debug
BuildArch:      noarch

%description
iLBC (internet Low Bitrate Codec) is a FREE speech codec suitable for
robust voice communication over IP. The codec is designed for narrow
band speech and results in a payload bit rate of 13.33 kbit/s with an
encoding frame length of 30 ms and 15.20 kbps with an encoding length
of 20 ms. The iLBC codec enables graceful speech quality degradation in
the case of lost frames, which occurs in connection with lost or
delayed IP packets.

%package -n %{libname}
Summary:        Shared library for ilbc (Internet Low Bitrate Codec)
Group:          System/Libraries

%description -n %{libname}
iLBC (internet Low Bitrate Codec) is a FREE speech codec suitable for
robust voice communication over IP. The codec is designed for narrow
band speech and results in a payload bit rate of 13.33 kbit/s with an
encoding frame length of 30 ms and 15.20 kbps with an encoding length
of 20 ms. The iLBC codec enables graceful speech quality degradation in
the case of lost frames, which occurs in connection with lost or
delayed IP packets.

%package devel
Summary:        Libraries and Header Files to Develop Programs with iLBC Support
Group:          Development/Languages/C and C++
Requires:       %{libname} = %{version}

%description devel
Libraries and Header Files to Develop Programs with iLBC Support.

%_mingw64_debug_package

%prep
%autosetup -p1 -n libilbc-%{version}

%build
%{_mingw64_cmake}
%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}
rm -Rv %{buildroot}%{_mingw64_docdir}/libilbc

%files -n %{libname}
%{_mingw64_bindir}/libilbc.dll

%files devel
%license COPYING
%doc README.md NEWS.md
%{_mingw64_bindir}/ilbc_test.exe
%{_mingw64_includedir}/ilbc.h
%{_mingw64_includedir}/ilbc_export.h
%{_mingw64_libdir}/libilbc.dll.a
%{_mingw64_libdir}/pkgconfig/libilbc.pc

%changelog
openSUSE Build Service is sponsored by