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