libseccomp/libseccomp.spec

96 lines
3 KiB
RPMSpec

%define major 2
%define libname %mklibname seccomp %{major}
%define develname %mklibname -d seccomp
Summary: Enhanced seccomp library
Name: libseccomp
Version: 2.4.1
Release: 1
License: LGPLv2
Group: System/Libraries
Url: https://github.com/seccomp/libseccomp
Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
# cherry-picks from git master for better support of newest kernels
Patch0: bf162816a6e42d7a40e54aadc18d1a98c34ca971.patch
Patch1: c95cdadef8746f9b4c714443e74e364f8fc7f10c.patch
Patch2: 5fc22428507ecea00ee9e2215d972777da9a99b6.patch
Patch3: bf747eb21e428c2b3ead6ebcca27951b681963a0.patch
%description
The libseccomp library provides an easy to use, platform independent,
interface to the Linux Kernel's syscall filtering mechanism.
The libseccomp API is designed to abstract away the underlying BPF based
syscall filter language and present a more conventional function-call based
filtering interface that should be familiar to, and easily adopted by,
application developers.
%package utils
Summary: scmp_sys_resolver - A tool to resolve system calls
Group: System/Libraries
%description utils
The scmp_sys_resolver utility resolves both system call names and numbers
with respect to the given architecture.
%package -n %{libname}
Summary: Collection library providing GObject-based interfaces and classes
Group: System/Libraries
%description -n %{libname}
The libseccomp library provides an easy to use, platform independent,
interface to the Linux Kernel's syscall filtering mechanism.
The libseccomp API is designed to abstract away the underlying BPF based
syscall filter language and present a more conventional function-call based
filtering interface that should be familiar to, and easily adopted by,
application developers.
%package -n %{develname}
Summary: Development files used to build applications with libseccomp support
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: seccomp-devel = %{version}-%{release}
%description -n %{develname}
The libseccomp library provides an easy to use, platform independent,
interface to the Linux Kernel's syscall filtering mechanism.
The libseccomp API is designed to abstract away the underlying BPF based
syscall filter language and present a more conventional function-call based
filtering interface that should be familiar to, and easily adopted by,
application developers.
%prep
%setup -q
%apply_patches
%build
autoreconf -fi
%configure2_5x
%make
%install
mkdir -p "%{buildroot}/%{_libdir}"
mkdir -p "%{buildroot}/%{_includedir}"
mkdir -p "%{buildroot}/%{_mandir}"
%makeinstall_std
%check
# standard regression tests
make check
rm -vf "%{buildroot}/%{_libdir}/libseccomp.a"
%files utils
%{_bindir}/scmp_sys_resolver
%{_mandir}/man1/scmp_sys_resolver.1.xz
%files -n %{libname}
%{_libdir}/libseccomp.so.%{major}*
%files -n %{develname}
%doc LICENSE CREDITS README.md
%{_includedir}/seccomp.h
%{_includedir}/seccomp-syscalls.h
%{_libdir}/libseccomp.so
%{_libdir}/pkgconfig/libseccomp.pc
%{_mandir}/man3/*