Add mingw subpackages
This commit is contained in:
parent
060bf2fc3c
commit
c3ad3d6ec0
93
opus.spec
93
opus.spec
@ -1,5 +1,14 @@
|
||||
#global candidate rc2
|
||||
|
||||
%if 0%{?fedora}
|
||||
%bcond_without mingw
|
||||
|
||||
# uses wine, requires enabled binfmt
|
||||
%bcond_with tests
|
||||
%else
|
||||
%bcond_with mingw
|
||||
%endif
|
||||
|
||||
Name: opus
|
||||
Version: 1.4
|
||||
Release: 1%{?candidate:.%{candidate}}%{?dist}
|
||||
@ -17,6 +26,18 @@ BuildRequires: gcc
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: libtool
|
||||
|
||||
%if %{with mingw}
|
||||
BuildRequires: mingw32-filesystem
|
||||
BuildRequires: mingw32-gcc
|
||||
|
||||
BuildRequires: mingw64-gcc
|
||||
BuildRequires: mingw64-filesystem
|
||||
|
||||
%if %{with tests}
|
||||
BuildRequires: wine
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
The Opus codec is designed for interactive speech and audio transmission over
|
||||
the Internet. It is designed by the IETF Codec Working Group and incorporates
|
||||
@ -30,6 +51,24 @@ Requires: opus = %{version}-%{release}
|
||||
%description devel
|
||||
Files for development with opus.
|
||||
|
||||
%if %{with mingw}
|
||||
%package -n mingw32-%{name}
|
||||
Summary: MinGW compiled %{name} library for Win32 target
|
||||
|
||||
%description -n mingw32-%{name}
|
||||
This package contains the MinGW compiled library of %{name}
|
||||
for Win32 target.
|
||||
|
||||
%package -n mingw64-%{name}
|
||||
Summary: MinGW compiled %{name} library for Win64 target
|
||||
|
||||
%description -n mingw64-%{name}
|
||||
This package contains the MinGW compiled library of %{name}
|
||||
for Win64 target.
|
||||
|
||||
%{?mingw_debug_package}
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q %{?candidate:-n %{name}-%{version}-%{candidate}}
|
||||
cp %{SOURCE1} .
|
||||
@ -37,6 +76,9 @@ cp %{SOURCE2} .
|
||||
|
||||
%build
|
||||
autoreconf -ivf
|
||||
mkdir build_native
|
||||
pushd build_native
|
||||
%global _configure ../configure
|
||||
%configure --enable-custom-modes --disable-static \
|
||||
--enable-hardening \
|
||||
%ifarch %{arm} %{arm64} %{power64}
|
||||
@ -44,34 +86,73 @@ autoreconf -ivf
|
||||
%endif
|
||||
|
||||
%make_build
|
||||
popd
|
||||
|
||||
%if %{with mingw}
|
||||
%mingw_configure --enable-custom-modes --disable-static --disable-doc
|
||||
%mingw_make %{?_smp_mflags} V=1
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%make_install -C build_native
|
||||
|
||||
# Remove libtool archives
|
||||
find %{buildroot} -type f -name "*.la" -delete
|
||||
rm -rf %{buildroot}%{_datadir}/doc/opus/html
|
||||
rm %{buildroot}%{_libdir}/libopus.la
|
||||
rm -rf %{buildroot}%{_datadir}/doc/opus
|
||||
|
||||
%if %{with mingw}
|
||||
%mingw_make_install DESTDIR=%{buildroot}
|
||||
rm %{buildroot}%{mingw32_libdir}/libopus.la
|
||||
rm %{buildroot}%{mingw64_libdir}/libopus.la
|
||||
%mingw_debug_install_post
|
||||
%endif
|
||||
|
||||
%check
|
||||
make check %{?_smp_mflags} V=1
|
||||
make -C build_native check %{?_smp_mflags} V=1
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%if %{with mingw}
|
||||
%if %{with tests}
|
||||
%mingw_make check
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%{_libdir}/libopus.so.*
|
||||
|
||||
%files devel
|
||||
%doc README doc/html rfc6716.txt rfc8251.txt
|
||||
%doc README build_native/doc/html rfc6716.txt rfc8251.txt
|
||||
%{_includedir}/opus
|
||||
%{_libdir}/libopus.so
|
||||
%{_libdir}/pkgconfig/opus.pc
|
||||
%{_datadir}/aclocal/opus.m4
|
||||
%{_datadir}/man/man3/opus_*.3.gz
|
||||
|
||||
%if %{with mingw}
|
||||
%files -n mingw32-%{name}
|
||||
%license COPYING
|
||||
%dir %{mingw32_includedir}/opus/
|
||||
%{mingw32_bindir}/libopus-0.dll
|
||||
%{mingw32_includedir}/opus/*.h
|
||||
%{mingw32_libdir}/libopus.dll.a
|
||||
%{mingw32_libdir}/pkgconfig/opus.pc
|
||||
%{mingw32_datadir}/aclocal/opus.m4
|
||||
|
||||
%files -n mingw64-%{name}
|
||||
%license COPYING
|
||||
%dir %{mingw64_includedir}/opus/
|
||||
%{mingw64_bindir}/libopus-0.dll
|
||||
%{mingw64_includedir}/opus/*.h
|
||||
%{mingw64_libdir}/libopus.dll.a
|
||||
%{mingw64_libdir}/pkgconfig/opus.pc
|
||||
%{mingw64_datadir}/aclocal/opus.m4
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Sep 27 2023 Marian Koncek <mkoncek@redhat.com> - 1.4-1
|
||||
- Update to upstream version 1.4
|
||||
- Add mingw subpackages
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
Loading…
Reference in New Issue
Block a user