3 %bcond_without tests # "make check"
4 %bcond_without static_libs # static library
5 %bcond_without python # Python bindings
8 # tests seem broken on x86 and x32
11 Summary: Enhanced Seccomp (mode 2) Helper library
12 Summary(pl.UTF-8): Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
18 #Source0Download: https://github.com/seccomp/libseccomp/releases
19 Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
20 # Source0-md5: e74a626bea0cd607c23229b10b5f93da
21 URL: https://github.com/seccomp/libseccomp
22 BuildRequires: pkgconfig
24 BuildRequires: python-Cython >= 0.16
25 BuildRequires: python-devel
26 BuildRequires: rpm-pythonprov
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 The libseccomp library provides and easy to use, platform independent,
32 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
33 The libseccomp API is designed to abstract away the underlying BPF
34 based syscall filter language and present a more conventional
35 function-call based filtering interface that should be familiar to,
36 and easily adopted by application developers.
38 %description -l pl.UTF-8
39 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
40 platformy interfejs do mechanizmu filtrowania wywołań systemowych
41 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
42 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
43 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
44 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
45 adaptowalny dla programistów aplikacji.
48 Summary: Header files for Seccomp library
49 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
54 Header files for Seccomp library.
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki Seccomp.
60 Summary: Static Seccomp library
61 Summary(pl.UTF-8): Statyczna biblioteka Seccomp
62 Group: Development/Libraries
63 Requires: %{name}-devel = %{version}-%{release}
66 Static Seccomp library.
68 %description static -l pl.UTF-8
69 Statyczna biblioteka Seccomp.
71 %package -n python-seccomp
72 Summary: Python binding for seccomp library
73 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp
74 Group: Libraries/Python
75 Requires: %{name} = %{version}-%{release}
77 %description -n python-seccomp
78 Python binding for seccomp library.
80 %description -n python-seccomp -l pl.UTF-8
81 Wiązanie Pythona do biblioteki seccomp.
88 --disable-silent-rules \
89 %{?with_python:--enable-python} \
90 %{!?with_static_libs:--disable-static}
93 %{?with_tests:%{__make} check}
96 rm -rf $RPM_BUILD_ROOT
98 DESTDIR=$RPM_BUILD_ROOT
100 # obsoleted by pkg-config file
101 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
104 rm -rf $RPM_BUILD_ROOT
106 %post -p /sbin/ldconfig
107 %postun -p /sbin/ldconfig
110 %defattr(644,root,root,755)
111 %doc CHANGELOG CREDITS README.md
112 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
113 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
115 %{_mandir}/man1/scmp_sys_resolver.1*
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_libdir}/libseccomp.so
120 %{_includedir}/seccomp.h
121 %{_pkgconfigdir}/libseccomp.pc
122 %{_mandir}/man3/seccomp_*.3*
124 %if %{with static_libs}
126 %defattr(644,root,root,755)
127 %{_libdir}/libseccomp.a
131 %files -n python-seccomp
132 %defattr(644,root,root,755)
133 %attr(755,root,root) %{py_sitedir}/seccomp.so
134 %{py_sitedir}/seccomp-%{version}-py*.egg-info