]>
Commit | Line | Data |
---|---|---|
3fa3c5e8 | 1 | # |
1b31ba42 | 2 | # Conditional build: |
26590938 JB |
3 | %bcond_without tests # "make check" |
4 | %bcond_without static_libs # static library | |
9d204a35 JB |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
bc3b5c7e | 7 | |
26590938 JB |
8 | %ifnarch %{x8664} |
9 | # tests seem broken on x86 and x32 | |
10 | %undefine with_tests | |
11 | %endif | |
98e97d35 JB |
12 | Summary: Enhanced Seccomp (mode 2) Helper library |
13 | Summary(pl.UTF-8): Rozszerzona biblioteka pomocnicza Seccomp (trybu 2) | |
14 | Name: libseccomp | |
d7cd0583 | 15 | Version: 2.4.3 |
f5680587 | 16 | Release: 1 |
98e97d35 JB |
17 | License: LGPL v2.1 |
18 | Group: Libraries | |
ebbe4ccc | 19 | #Source0Download: https://github.com/seccomp/libseccomp/releases |
1b31ba42 | 20 | Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz |
d7cd0583 | 21 | # Source0-md5: 1de97a3c04889a790d97722d08f4a8d1 |
1b31ba42 | 22 | URL: https://github.com/seccomp/libseccomp |
dc9dafa9 | 23 | BuildRequires: pkgconfig |
e4973dc4 | 24 | %if %{with python2} |
9f228da8 | 25 | BuildRequires: python-Cython >= 0.16 |
26590938 | 26 | BuildRequires: python-devel |
9f228da8 | 27 | %endif |
e4973dc4 | 28 | %if %{with python3} |
9d204a35 JB |
29 | BuildRequires: python3-Cython >= 0.16 |
30 | BuildRequires: python3-devel | |
31 | %endif | |
32 | %if %{with python2} || %{with python3} | |
33 | BuildRequires: rpm-pythonprov | |
34 | BuildRequires: rpmbuild(macros) >= 1.714 | |
e4973dc4 | 35 | %endif |
98e97d35 JB |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
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. | |
45 | ||
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 | |
bc3b5c7e ER |
49 | jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby |
50 | wyabstrahować język filtrowania wywołań BPF niższego poziomu i | |
98e97d35 JB |
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. | |
54 | ||
55 | %package devel | |
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} | |
60 | ||
61 | %description devel | |
62 | Header files for Seccomp library. | |
63 | ||
64 | %description devel -l pl.UTF-8 | |
65 | Pliki nagłówkowe biblioteki Seccomp. | |
66 | ||
67 | %package static | |
68 | Summary: Static Seccomp library | |
69 | Summary(pl.UTF-8): Statyczna biblioteka Seccomp | |
70 | Group: Development/Libraries | |
71 | Requires: %{name}-devel = %{version}-%{release} | |
72 | ||
73 | %description static | |
74 | Static Seccomp library. | |
75 | ||
76 | %description static -l pl.UTF-8 | |
77 | Statyczna biblioteka Seccomp. | |
78 | ||
26590938 JB |
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} | |
84 | ||
85 | %description -n python-seccomp | |
86 | Python binding for seccomp library. | |
87 | ||
88 | %description -n python-seccomp -l pl.UTF-8 | |
89 | Wiązanie Pythona do biblioteki seccomp. | |
90 | ||
e4973dc4 | 91 | %package -n python3-seccomp |
9d204a35 JB |
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} | |
e4973dc4 AM |
96 | |
97 | %description -n python3-seccomp | |
98 | Python 3 binding for seccomp library. | |
99 | ||
100 | %description -n python3-seccomp -l pl.UTF-8 | |
101 | Wiązanie Pythona 3 do biblioteki seccomp. | |
102 | ||
98e97d35 JB |
103 | %prep |
104 | %setup -q | |
98e97d35 JB |
105 | |
106 | %build | |
1b31ba42 ER |
107 | %configure \ |
108 | --disable-silent-rules \ | |
387648c9 | 109 | --disable-python \ |
1b31ba42 ER |
110 | %{!?with_static_libs:--disable-static} |
111 | %{__make} | |
98e97d35 | 112 | |
e4973dc4 AM |
113 | CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS |
114 | cd src/python | |
115 | VERSION_RELEASE="%{version}"; export VERSION_RELEASE | |
116 | %if %{with python2} | |
117 | %py_build | |
118 | #%{?with_tests:test} | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
122 | %py3_build | |
123 | #%{?with_tests:test} | |
124 | %endif | |
125 | cd ../../ | |
126 | ||
1b31ba42 | 127 | %{?with_tests:%{__make} check} |
3fa3c5e8 | 128 | |
98e97d35 JB |
129 | %install |
130 | rm -rf $RPM_BUILD_ROOT | |
98e97d35 JB |
131 | %{__make} install \ |
132 | DESTDIR=$RPM_BUILD_ROOT | |
133 | ||
1b31ba42 ER |
134 | # obsoleted by pkg-config file |
135 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la | |
98e97d35 | 136 | |
e4973dc4 AM |
137 | CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS |
138 | cd src/python | |
139 | VERSION_RELEASE="%{version}"; export VERSION_RELEASE | |
140 | %if %{with python2} | |
141 | %py_install | |
142 | ||
143 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
144 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
145 | ||
146 | %py_postclean | |
147 | %endif | |
148 | ||
149 | %if %{with python3} | |
150 | %py3_install | |
151 | %endif | |
152 | ||
98e97d35 JB |
153 | %clean |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %post -p /sbin/ldconfig | |
157 | %postun -p /sbin/ldconfig | |
158 | ||
159 | %files | |
160 | %defattr(644,root,root,755) | |
ebbe4ccc | 161 | %doc CHANGELOG CREDITS README.md |
d24f42eb | 162 | %attr(755,root,root) %{_bindir}/scmp_sys_resolver |
98e97d35 | 163 | %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.* |
c86f6298 | 164 | %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2 |
d24f42eb | 165 | %{_mandir}/man1/scmp_sys_resolver.1* |
98e97d35 JB |
166 | |
167 | %files devel | |
168 | %defattr(644,root,root,755) | |
169 | %attr(755,root,root) %{_libdir}/libseccomp.so | |
170 | %{_includedir}/seccomp.h | |
f5680587 | 171 | %{_includedir}/seccomp-syscalls.h |
98e97d35 JB |
172 | %{_pkgconfigdir}/libseccomp.pc |
173 | %{_mandir}/man3/seccomp_*.3* | |
174 | ||
1b31ba42 | 175 | %if %{with static_libs} |
98e97d35 JB |
176 | %files static |
177 | %defattr(644,root,root,755) | |
178 | %{_libdir}/libseccomp.a | |
1b31ba42 | 179 | %endif |
26590938 | 180 | |
e4973dc4 | 181 | %if %{with python2} |
26590938 JB |
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 | |
186 | %endif | |
e4973dc4 AM |
187 | |
188 | %if %{with python3} | |
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 | |
193 | %endif |