File libuv.spec of Package libuv
# Some of the tests do not work with the network-free environment in Koji
# The packager should run `fedpkg local --with tests` on their machine
# before pushing to Koji
%bcond_with tests
Name: libuv
Summary: libuv is a multi-platform support library with a focus on asynchronous I/O.
# version and release get overridden by _service in OBS
Epoch: 1
Version: 1.44.2
Release: 1%{?dist}
# the licensing breakdown is described in detail in the LICENSE file
License: MIT and BSD and ISC
URL: http://libuv.org/
Source0: http://dist.libuv.org/dist/v%{version}/libuv-v%{version}.tar.gz
Source2: %{name}.pc.in
Source3: libuv.abignore
BuildRequires: autoconf automake libtool
BuildRequires: gcc make
%if %{with tests}
# don't remove network tests
%else
# -- Patches -- #
Patch0001: 0001-Disable-failing-network-tests.patch
%endif
Patch0002: 0002-Fix-for-CVE-2024-24806.patch
%description
libuv is a multi-platform support library with a focus on asynchronous I/O
%package devel
Summary: Development libraries for libuv
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description devel
Development libraries for libuv
%package static
Summary: Platform layer for node.js - static library
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
%description static
Static library (.a) version of libuv.
%prep
%autosetup -n %{name}-v%{version} -p1
%build
./autogen.sh
%configure --disable-silent-rules
%make_build
%install
%make_install
rm -f %{buildroot}%{_libdir}/libuv.la
mkdir -p %{buildroot}%{_libdir}/libuv/
install -Dm0644 -t %{buildroot}%{_libdir}/libuv/ %{SOURCE3}
%check
# Tests are currently disabled because some require network access
# Working with upstream to split these out
#./run-tests
#./run-benchmarks
make check
# RHEL7 (and earlier) don't have the ldconfig_scriptlets from "new" RPM
%if 0%{?ldconfig_scriptlets}
%{?ldconfig_scriptlets}
%else
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files
%doc README.md AUTHORS CONTRIBUTING.md MAINTAINERS.md SUPPORTED_PLATFORMS.md
%doc ChangeLog
%license LICENSE
%{_libdir}/%{name}.so.*
%{_libdir}/libuv/libuv.abignore
%files devel
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/uv.h
%{_includedir}/uv/
%files static
%{_libdir}/%{name}.a