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: bdee14f3453d118fc29456c6c4cb178e
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 BuildConflicts: valgrind
45 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 parisc parisc64 ppc ppc64 riscv64 s390 s390x
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 The libseccomp library provides and easy to use, platform independent,
50 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
51 The libseccomp API is designed to abstract away the underlying BPF
52 based syscall filter language and present a more conventional
53 function-call based filtering interface that should be familiar to,
54 and easily adopted by application developers.
56 %description -l pl.UTF-8
57 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
58 platformy interfejs do mechanizmu filtrowania wywołań systemowych
59 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
60 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
61 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
62 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
63 adaptowalny dla programistów aplikacji.
66 Summary: Header files for Seccomp library
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp
68 Group: Development/Libraries
69 Requires: %{name} = %{version}-%{release}
72 Header files for Seccomp library.
74 %description devel -l pl.UTF-8
75 Pliki nagłówkowe biblioteki Seccomp.
78 Summary: Static Seccomp library
79 Summary(pl.UTF-8): Statyczna biblioteka Seccomp
80 Group: Development/Libraries
81 Requires: %{name}-devel = %{version}-%{release}
84 Static Seccomp library.
86 %description static -l pl.UTF-8
87 Statyczna biblioteka Seccomp.
89 %package -n python-seccomp
90 Summary: Python binding for seccomp library
91 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp
92 Group: Libraries/Python
93 Requires: %{name} = %{version}-%{release}
95 %description -n python-seccomp
96 Python binding for seccomp library.
98 %description -n python-seccomp -l pl.UTF-8
99 Wiązanie Pythona do biblioteki seccomp.
101 %package -n python3-seccomp
102 Summary: Python 3 binding for seccomp library
103 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki seccomp
104 Group: Libraries/Python
105 Requires: %{name} = %{version}-%{release}
107 %description -n python3-seccomp
108 Python 3 binding for seccomp library.
110 %description -n python3-seccomp -l pl.UTF-8
111 Wiązanie Pythona 3 do biblioteki seccomp.
118 --disable-silent-rules \
120 %{!?with_static_libs:--disable-static}
123 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
125 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
135 %{?with_tests:%{__make} check}
138 rm -rf $RPM_BUILD_ROOT
140 DESTDIR=$RPM_BUILD_ROOT
142 # obsoleted by pkg-config file
143 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
145 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
147 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
151 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
152 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
162 rm -rf $RPM_BUILD_ROOT
164 %post -p /sbin/ldconfig
165 %postun -p /sbin/ldconfig
168 %defattr(644,root,root,755)
169 %doc CHANGELOG CREDITS README.md SECURITY.md
170 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
171 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
172 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
173 %{_mandir}/man1/scmp_sys_resolver.1*
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_libdir}/libseccomp.so
178 %{_includedir}/seccomp.h
179 %{_includedir}/seccomp-syscalls.h
180 %{_pkgconfigdir}/libseccomp.pc
181 %{_mandir}/man3/seccomp_*.3*
183 %if %{with static_libs}
185 %defattr(644,root,root,755)
186 %{_libdir}/libseccomp.a
190 %files -n python-seccomp
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{py_sitedir}/seccomp.so
193 %{py_sitedir}/seccomp-%{version}-py*.egg-info
197 %files -n python3-seccomp
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{py3_sitedir}/seccomp.*.so
200 %{py3_sitedir}/seccomp-%{version}-py*.egg-info