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
13 %if %{without static_libs}
14 %undefine with_python2
15 %undefine with_python3
17 Summary: Enhanced Seccomp (mode 2) Helper library
18 Summary(pl.UTF-8): Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
24 #Source0Download: https://github.com/seccomp/libseccomp/releases
25 Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
26 # Source0-md5: 5096d3912a605a72b27805fa0ef9886d
27 URL: https://github.com/seccomp/libseccomp
29 BuildRequires: pkgconfig
31 BuildRequires: python-Cython >= 0.29
32 BuildRequires: python-devel >= 1:2.6
35 BuildRequires: python3-Cython >= 0.29
36 BuildRequires: python3-devel >= 1:3.3
38 %if %{with python2} || %{with python3}
39 BuildRequires: rpm-pythonprov
40 BuildRequires: rpmbuild(macros) >= 1.714
43 BuildRequires: glibc-debuginfo
44 BuildRequires: valgrind
46 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 parisc parisc64 ppc ppc64 riscv64 s390 s390x
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 The libseccomp library provides and easy to use, platform independent,
51 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
52 The libseccomp API is designed to abstract away the underlying BPF
53 based syscall filter language and present a more conventional
54 function-call based filtering interface that should be familiar to,
55 and easily adopted by application developers.
57 %description -l pl.UTF-8
58 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
59 platformy interfejs do mechanizmu filtrowania wywołań systemowych
60 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
61 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
62 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
63 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
64 adaptowalny dla programistów aplikacji.
67 Summary: Header files for Seccomp library
68 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
73 Header files for Seccomp library.
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki Seccomp.
79 Summary: Static Seccomp library
80 Summary(pl.UTF-8): Statyczna biblioteka Seccomp
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
85 Static Seccomp library.
87 %description static -l pl.UTF-8
88 Statyczna biblioteka Seccomp.
90 %package -n python-seccomp
91 Summary: Python binding for seccomp library
92 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp
93 Group: Libraries/Python
94 Requires: %{name} = %{version}-%{release}
96 %description -n python-seccomp
97 Python binding for seccomp library.
99 %description -n python-seccomp -l pl.UTF-8
100 Wiązanie Pythona do biblioteki seccomp.
102 %package -n python3-seccomp
103 Summary: Python 3 binding for seccomp library
104 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki seccomp
105 Group: Libraries/Python
106 Requires: %{name} = %{version}-%{release}
108 %description -n python3-seccomp
109 Python 3 binding for seccomp library.
111 %description -n python3-seccomp -l pl.UTF-8
112 Wiązanie Pythona 3 do biblioteki seccomp.
119 --disable-silent-rules \
121 %{!?with_static_libs:--disable-static}
124 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
126 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
136 %{?with_tests:%{__make} check}
139 rm -rf $RPM_BUILD_ROOT
141 DESTDIR=$RPM_BUILD_ROOT
143 # obsoleted by pkg-config file
144 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
146 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
148 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
152 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
153 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
163 rm -rf $RPM_BUILD_ROOT
165 %post -p /sbin/ldconfig
166 %postun -p /sbin/ldconfig
169 %defattr(644,root,root,755)
170 %doc CHANGELOG CREDITS README.md SECURITY.md
171 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
172 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
173 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
174 %{_mandir}/man1/scmp_sys_resolver.1*
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/libseccomp.so
179 %{_includedir}/seccomp.h
180 %{_includedir}/seccomp-syscalls.h
181 %{_pkgconfigdir}/libseccomp.pc
182 %{_mandir}/man3/seccomp_*.3*
184 %if %{with static_libs}
186 %defattr(644,root,root,755)
187 %{_libdir}/libseccomp.a
191 %files -n python-seccomp
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{py_sitedir}/seccomp.so
194 %{py_sitedir}/seccomp-%{version}-py*.egg-info
198 %files -n python3-seccomp
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{py3_sitedir}/seccomp.*.so
201 %{py3_sitedir}/seccomp-%{version}-py*.egg-info