File libslirp.spec of Package libslirp.24201

#
# spec file for package libslirp
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define libname libslirp0

Name:           libslirp
Version:        4.3.1
Release:        0
Summary:        A general purpose TCP-IP emulator
License:        MIT
Group:          System/Libraries
URL:            https://gitlab.freedesktop.org/slirp/%{name}
Source0:        %{name}-%{version}.tar.xz
# CVE-2021-3592 [bsc#1187364], invalid pointer initialization may lead to information disclosure (bootp)
Patch0:         libslirp-CVE-2021-3592.patch
# CVE-2021-3595 [bsc#1187366], invalid pointer initialization may lead to information disclosure (tftp)
Patch1:         libslirp-CVE-2021-3595.patch
# CVE-2021-3594 [bsc#1187367], invalid pointer initialization may lead to information disclosure (udp)
Patch2:         libslirp-CVE-2021-3594.patch
# Fix dhcp regression [bsc#1198773]
Patch3:         libslirp-fix-dhcp-1.patch
Patch4:         libslirp-fix-dhcp-2.patch
BuildRequires:  gcc
BuildRequires:  git-core
BuildRequires:  glib2-devel
BuildRequires:  meson

%description
A general purpose TCP-IP emulator used by virtual machine hypervisors
to provide virtual networking services.

%package -n %{libname}
Summary:        A networking Library
Group:          System/Libraries

%description -n %{libname}
A user-mode networking library used by virtual machines, containers
or various tools.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


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

%build
%meson
%meson_build

%install
%meson_install

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files -n %{libname}
%license COPYRIGHT
%doc README.md CHANGELOG.md
%{_libdir}/%{name}.so.0*

%files devel
%dir %{_includedir}/slirp/
%{_includedir}/slirp/*
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/slirp.pc

%changelog
openSUSE Build Service is sponsored by