Name:           libseccomp
Version:        2.5.5
Release:        1%{?dist}
Summary:        High level interface to the Linux Kernel's seccomp filter
Group:          System/Libraries
URL:            https://sourceforge.net/projects/libseccomp/
Source:         https://github.com/seccomp/libseccomp.git/v%{version}/libseccomp-%{version}.tar.gz
License:        GPL
BuildRequires:  glibc-devel
BuildRequires:  gperf

%description
High level interface to the Linux Kernel's seccomp filter.

%package devel
Group:         Development/Libraries
Summary:       Development files for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      pkg-config

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

%package tools
Group:         Applications/Security
Summary:       Utility applications for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description tools
This package contains utility applications for %{name}.

%prep
%setup -q
./autogen.sh
autoreconf -fiv

%build
%configure --libdir=/usr/lib64
%make_build

%install
%make_install

%files
%{_libdir}/libseccomp.so.*
%doc CREDITS LICENSE

%files devel
%{_includedir}/seccomp.h
%{_includedir}/seccomp-syscalls.h
%{_libdir}/libseccomp.a
%{_libdir}/libseccomp.so
%{_libdir}/pkgconfig/libseccomp.pc
%{_mandir}/man3/seccomp_*.3*

%files tools
%{_bindir}/scmp_sys_resolver
%{_mandir}/man1/scmp_sys_resolver.1*