3 %bcond_without tests # "make check"
4 %bcond_without static_libs # static library
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 # tests seem broken on x86 and x32
12 Summary: Enhanced Seccomp (mode 2) Helper library
13 Summary(pl.UTF-8): Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
19 #Source0Download: https://github.com/seccomp/libseccomp/releases
20 Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5: 4fa6b0f39b48b8644415d7a9a9dfe9f4
22 URL: https://github.com/seccomp/libseccomp
23 BuildRequires: pkgconfig
25 BuildRequires: python-Cython >= 0.16
26 BuildRequires: python-devel
27 BuildRequires: rpm-pythonprov
30 BuildRequires: python3-Cython >= 0.16
31 BuildRequires: python3-devel
32 BuildRequires: rpm-pythonprov
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 The libseccomp library provides and easy to use, platform independent,
38 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
39 The libseccomp API is designed to abstract away the underlying BPF
40 based syscall filter language and present a more conventional
41 function-call based filtering interface that should be familiar to,
42 and easily adopted by application developers.
44 %description -l pl.UTF-8
45 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
46 platformy interfejs do mechanizmu filtrowania wywołań systemowych
47 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
48 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
49 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
50 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
51 adaptowalny dla programistów aplikacji.
54 Summary: Header files for Seccomp library
55 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
60 Header files for Seccomp library.
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki Seccomp.
66 Summary: Static Seccomp library
67 Summary(pl.UTF-8): Statyczna biblioteka Seccomp
68 Group: Development/Libraries
69 Requires: %{name}-devel = %{version}-%{release}
72 Static Seccomp library.
74 %description static -l pl.UTF-8
75 Statyczna biblioteka Seccomp.
77 %package -n python-seccomp
78 Summary: Python binding for seccomp library
79 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp
80 Group: Libraries/Python
81 Requires: %{name} = %{version}-%{release}
83 %description -n python-seccomp
84 Python binding for seccomp library.
86 %description -n python-seccomp -l pl.UTF-8
87 Wiązanie Pythona do biblioteki seccomp.
89 %package -n python3-seccomp
90 Summary: Python 3 binding for seccomp library
91 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki seccomp
92 Group: Libraries/Python
93 Requires: %{name} = %{version}-%{release}
95 %description -n python3-seccomp
96 Python 3 binding for seccomp library.
98 %description -n python3-seccomp -l pl.UTF-8
99 Wiązanie Pythona 3 do biblioteki seccomp.
106 --disable-silent-rules \
108 %{!?with_static_libs:--disable-static}
111 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
113 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
125 %{?with_tests:%{__make} check}
128 rm -rf $RPM_BUILD_ROOT
130 DESTDIR=$RPM_BUILD_ROOT
132 # obsoleted by pkg-config file
133 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
135 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
137 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
141 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
142 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
152 rm -rf $RPM_BUILD_ROOT
154 %post -p /sbin/ldconfig
155 %postun -p /sbin/ldconfig
158 %defattr(644,root,root,755)
159 %doc CHANGELOG CREDITS README.md
160 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
161 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
163 %{_mandir}/man1/scmp_sys_resolver.1*
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libseccomp.so
168 %{_includedir}/seccomp.h
169 %{_pkgconfigdir}/libseccomp.pc
170 %{_mandir}/man3/seccomp_*.3*
172 %if %{with static_libs}
174 %defattr(644,root,root,755)
175 %{_libdir}/libseccomp.a
179 %files -n python-seccomp
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{py_sitedir}/seccomp.so
182 %{py_sitedir}/seccomp-%{version}-py*.egg-info
186 %files -n python3-seccomp
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{py3_sitedir}/seccomp.*.so
189 %{py3_sitedir}/seccomp-%{version}-py*.egg-info