]> git.pld-linux.org Git - packages/libseccomp.git/blob - libseccomp.spec
198a68927528a73b0f57dbd83712b98bc9eeb3bd
[packages/libseccomp.git] / libseccomp.spec
1 #
2 # Conditional build:
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
7
8 %ifnarch %{x8664}
9 # tests seem broken on x86 and x32
10 %undefine       with_tests
11 %endif
12 Summary:        Enhanced Seccomp (mode 2) Helper library
13 Summary(pl.UTF-8):      Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
14 Name:           libseccomp
15 Version:        2.4.3
16 Release:        1
17 License:        LGPL v2.1
18 Group:          Libraries
19 #Source0Download: https://github.com/seccomp/libseccomp/releases
20 Source0:        https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5:  1de97a3c04889a790d97722d08f4a8d1
22 URL:            https://github.com/seccomp/libseccomp
23 BuildRequires:  pkgconfig
24 %if %{with python2}
25 BuildRequires:  python-Cython >= 0.16
26 BuildRequires:  python-devel
27 %endif
28 %if %{with python3}
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
35 %endif
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
49 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
50 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
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
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
91 %package -n python3-seccomp
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}
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
103 %prep
104 %setup -q
105
106 %build
107 %configure \
108         --disable-silent-rules \
109         --disable-python
110         %{!?with_static_libs:--disable-static}
111 %{__make}
112
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
127 %{?with_tests:%{__make} check}
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131 %{__make} install \
132         DESTDIR=$RPM_BUILD_ROOT
133
134 # obsoleted by pkg-config file
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
136
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
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)
161 %doc CHANGELOG CREDITS README.md
162 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
163 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
165 %{_mandir}/man1/scmp_sys_resolver.1*
166
167 %files devel
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libseccomp.so
170 %{_includedir}/seccomp.h
171 %{_includedir}/seccomp-syscalls.h
172 %{_pkgconfigdir}/libseccomp.pc
173 %{_mandir}/man3/seccomp_*.3*
174
175 %if %{with static_libs}
176 %files static
177 %defattr(644,root,root,755)
178 %{_libdir}/libseccomp.a
179 %endif
180
181 %if %{with python2}
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
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
This page took 0.071541 seconds and 2 git commands to generate.