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: 1de97a3c04889a790d97722d08f4a8d1
22 URL: https://github.com/seccomp/libseccomp
23 BuildRequires: pkgconfig
25 BuildRequires: python-Cython >= 0.16
26 BuildRequires: python-devel
29 BuildRequires: python3-Cython >= 0.16
30 BuildRequires: python3-devel
32 %if %{with python2} || %{with python3}
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.714
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 The libseccomp library provides and easy to use, platform independent,
40 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
41 The libseccomp API is designed to abstract away the underlying BPF
42 based syscall filter language and present a more conventional
43 function-call based filtering interface that should be familiar to,
44 and easily adopted by application developers.
46 %description -l pl.UTF-8
47 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
48 platformy interfejs do mechanizmu filtrowania wywołań systemowych
49 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
50 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
51 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
52 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
53 adaptowalny dla programistów aplikacji.
56 Summary: Header files for Seccomp library
57 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
62 Header files for Seccomp library.
64 %description devel -l pl.UTF-8
65 Pliki nagłówkowe biblioteki Seccomp.
68 Summary: Static Seccomp library
69 Summary(pl.UTF-8): Statyczna biblioteka Seccomp
70 Group: Development/Libraries
71 Requires: %{name}-devel = %{version}-%{release}
74 Static Seccomp library.
76 %description static -l pl.UTF-8
77 Statyczna biblioteka Seccomp.
79 %package -n python-seccomp
80 Summary: Python binding for seccomp library
81 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp
82 Group: Libraries/Python
83 Requires: %{name} = %{version}-%{release}
85 %description -n python-seccomp
86 Python binding for seccomp library.
88 %description -n python-seccomp -l pl.UTF-8
89 Wiązanie Pythona do biblioteki seccomp.
91 %package -n python3-seccomp
92 Summary: Python 3 binding for seccomp library
93 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki seccomp
94 Group: Libraries/Python
95 Requires: %{name} = %{version}-%{release}
97 %description -n python3-seccomp
98 Python 3 binding for seccomp library.
100 %description -n python3-seccomp -l pl.UTF-8
101 Wiązanie Pythona 3 do biblioteki seccomp.
108 --disable-silent-rules \
110 %{!?with_static_libs:--disable-static}
113 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
115 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
127 %{?with_tests:%{__make} check}
130 rm -rf $RPM_BUILD_ROOT
132 DESTDIR=$RPM_BUILD_ROOT
134 # obsoleted by pkg-config file
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
137 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
139 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
143 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
144 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
154 rm -rf $RPM_BUILD_ROOT
156 %post -p /sbin/ldconfig
157 %postun -p /sbin/ldconfig
160 %defattr(644,root,root,755)
161 %doc CHANGELOG CREDITS README.md
162 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
163 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
165 %{_mandir}/man1/scmp_sys_resolver.1*
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libseccomp.so
170 %{_includedir}/seccomp.h
171 %{_includedir}/seccomp-syscalls.h
172 %{_pkgconfigdir}/libseccomp.pc
173 %{_mandir}/man3/seccomp_*.3*
175 %if %{with static_libs}
177 %defattr(644,root,root,755)
178 %{_libdir}/libseccomp.a
182 %files -n python-seccomp
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{py_sitedir}/seccomp.so
185 %{py_sitedir}/seccomp-%{version}-py*.egg-info
189 %files -n python3-seccomp
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{py3_sitedir}/seccomp.*.so
192 %{py3_sitedir}/seccomp-%{version}-py*.egg-info