]>
Commit | Line | Data |
---|---|---|
3fa3c5e8 | 1 | # |
1b31ba42 | 2 | # Conditional build: |
26590938 JB |
3 | %bcond_without tests # "make check" |
4 | %bcond_without static_libs # static library | |
5 | %bcond_without python # Python bindings | |
bc3b5c7e | 6 | |
26590938 JB |
7 | %ifnarch %{x8664} |
8 | # tests seem broken on x86 and x32 | |
9 | %undefine with_tests | |
10 | %endif | |
98e97d35 JB |
11 | Summary: Enhanced Seccomp (mode 2) Helper library |
12 | Summary(pl.UTF-8): Rozszerzona biblioteka pomocnicza Seccomp (trybu 2) | |
13 | Name: libseccomp | |
1b31ba42 | 14 | Version: 2.2.3 |
1fbe6bfe | 15 | Release: 2 |
98e97d35 JB |
16 | License: LGPL v2.1 |
17 | Group: Libraries | |
1b31ba42 ER |
18 | Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz |
19 | # Source0-md5: 7db418d35d7a6168400bf6b05502f8bf | |
20 | URL: https://github.com/seccomp/libseccomp | |
dc9dafa9 | 21 | BuildRequires: pkgconfig |
9f228da8 ER |
22 | %if %{with python} |
23 | BuildRequires: python-Cython >= 0.16 | |
26590938 JB |
24 | BuildRequires: python-devel |
25 | BuildRequires: rpm-pythonprov | |
9f228da8 | 26 | %endif |
98e97d35 JB |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
30 | The libseccomp library provides and easy to use, platform independent, | |
31 | interface to the Linux Kernel's syscall filtering mechanism: seccomp. | |
32 | The libseccomp API is designed to abstract away the underlying BPF | |
33 | based syscall filter language and present a more conventional | |
34 | function-call based filtering interface that should be familiar to, | |
35 | and easily adopted by application developers. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od | |
39 | platformy interfejs do mechanizmu filtrowania wywołań systemowych | |
bc3b5c7e ER |
40 | jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby |
41 | wyabstrahować język filtrowania wywołań BPF niższego poziomu i | |
98e97d35 JB |
42 | zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu |
43 | o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej | |
44 | adaptowalny dla programistów aplikacji. | |
45 | ||
46 | %package devel | |
47 | Summary: Header files for Seccomp library | |
48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp | |
49 | Group: Development/Libraries | |
50 | Requires: %{name} = %{version}-%{release} | |
51 | ||
52 | %description devel | |
53 | Header files for Seccomp library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Pliki nagłówkowe biblioteki Seccomp. | |
57 | ||
58 | %package static | |
59 | Summary: Static Seccomp library | |
60 | Summary(pl.UTF-8): Statyczna biblioteka Seccomp | |
61 | Group: Development/Libraries | |
62 | Requires: %{name}-devel = %{version}-%{release} | |
63 | ||
64 | %description static | |
65 | Static Seccomp library. | |
66 | ||
67 | %description static -l pl.UTF-8 | |
68 | Statyczna biblioteka Seccomp. | |
69 | ||
26590938 JB |
70 | %package -n python-seccomp |
71 | Summary: Python binding for seccomp library | |
72 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp | |
73 | Group: Libraries/Python | |
74 | Requires: %{name} = %{version}-%{release} | |
75 | ||
76 | %description -n python-seccomp | |
77 | Python binding for seccomp library. | |
78 | ||
79 | %description -n python-seccomp -l pl.UTF-8 | |
80 | Wiązanie Pythona do biblioteki seccomp. | |
81 | ||
98e97d35 JB |
82 | %prep |
83 | %setup -q | |
98e97d35 JB |
84 | |
85 | %build | |
1b31ba42 ER |
86 | %configure \ |
87 | --disable-silent-rules \ | |
9f228da8 | 88 | %{?with_python:--enable-python} \ |
1b31ba42 ER |
89 | %{!?with_static_libs:--disable-static} |
90 | %{__make} | |
98e97d35 | 91 | |
1b31ba42 | 92 | %{?with_tests:%{__make} check} |
3fa3c5e8 | 93 | |
98e97d35 JB |
94 | %install |
95 | rm -rf $RPM_BUILD_ROOT | |
98e97d35 JB |
96 | %{__make} install \ |
97 | DESTDIR=$RPM_BUILD_ROOT | |
98 | ||
1b31ba42 ER |
99 | # obsoleted by pkg-config file |
100 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la | |
98e97d35 JB |
101 | |
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %post -p /sbin/ldconfig | |
106 | %postun -p /sbin/ldconfig | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
110 | %doc CHANGELOG CREDITS README | |
d24f42eb | 111 | %attr(755,root,root) %{_bindir}/scmp_sys_resolver |
98e97d35 | 112 | %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.* |
c86f6298 | 113 | %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2 |
d24f42eb | 114 | %{_mandir}/man1/scmp_sys_resolver.1* |
98e97d35 JB |
115 | |
116 | %files devel | |
117 | %defattr(644,root,root,755) | |
118 | %attr(755,root,root) %{_libdir}/libseccomp.so | |
119 | %{_includedir}/seccomp.h | |
120 | %{_pkgconfigdir}/libseccomp.pc | |
121 | %{_mandir}/man3/seccomp_*.3* | |
122 | ||
1b31ba42 | 123 | %if %{with static_libs} |
98e97d35 JB |
124 | %files static |
125 | %defattr(644,root,root,755) | |
126 | %{_libdir}/libseccomp.a | |
1b31ba42 | 127 | %endif |
26590938 JB |
128 | |
129 | %if %{with python} | |
130 | %files -n python-seccomp | |
131 | %defattr(644,root,root,755) | |
132 | %attr(755,root,root) %{py_sitedir}/seccomp.so | |
133 | %{py_sitedir}/seccomp-%{version}-py*.egg-info | |
134 | %endif |