File mingw64-opusfile.spec of Package mingw64-opusfile
#
# spec file for package mingw64-opusfile
#
# 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 opusfile
%define libname mingw64-lib%{realname}
Name: mingw64-%{realname}
Version: 0.12
Release: 0
Summary: A high-level API for decoding and seeking within .opus files
License: BSD-3-Clause
Group: System/Libraries
URL: https://opus-codec.org/
Source: https://downloads.xiph.org/releases/opus/%{realname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM opusfile-CVE-2022-47021.patch boo#1207381 mgorse@suse.com -- fix a NULL pointer dereference.
Patch0: opusfile-CVE-2022-47021.patch
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-libopenssl-devel
BuildRequires: mingw64-libogg-devel >= 1.3
BuildRequires: mingw64-opus-devel >= 1.0.1
%_mingw64_package_header_debug
BuildArch: noarch
%description
opusfile provides a high-level API for decoding and seeking within .opus files.
It includes:
* Support for all files with at least one Opus stream
(including multichannel files or Ogg files where Opus is muxed with something else).
* Full support, including seeking, for chained files.
* A simple stereo downmixing API
(allowing chained files to be decoded with a single output format, even if the channel count changes).
* Support for reading from a file, memory buffer, or over HTTP(S) (including seeking).
* Support for both random access and streaming data sources.
%package -n %{libname}
Summary: A high-level API for decoding and seeking within .opus files
%description -n %{libname}
opusfile provides a high-level API for decoding and seeking within .opus files.
It includes:
* Support for all files with at least one Opus stream
(including multichannel files or Ogg files where Opus is muxed with something else).
* Full support, including seeking, for chained files.
* A simple stereo downmixing API
(allowing chained files to be decoded with a single output format, even if the channel count changes).
* Support for reading from a file, memory buffer, or over HTTP(S) (including seeking).
* Support for both random access and streaming data sources.
%package -n mingw64-%{realname}-devel
Summary: Development package for %{name}
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description -n mingw64-%{realname}-devel
Files for development with %{name}.
%_mingw64_debug_package
%prep
%setup -q -n %{realname}-%{version}
%autopatch -p1
%build
%{_mingw64_configure} \
--disable-static \
--disable-silent-rules
%{make_build}
%install
%{_mingw64_make_install}
rm -rf %{buildroot}%{_mingw64_datadir}/doc/opusfile/
%files -n %{libname}
%{_mingw64_bindir}/libopusfile-0.dll
%{_mingw64_bindir}/libopusurl-0.dll
%files -n mingw64-%{realname}-devel
%license COPYING
%doc README.md
%{_mingw64_includedir}/opus/opusfile.h
%{_mingw64_libdir}/libopusfile.dll.a
%{_mingw64_libdir}/libopusurl.dll.a
%{_mingw64_libdir}/pkgconfig/opusfile.pc
%{_mingw64_libdir}/pkgconfig/opusurl.pc
%changelog