]> git.pld-linux.org Git - packages/libseccomp.git/blob - libseccomp.spec
Release 3 (by relup.sh)
[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
13 %if %{without static_libs}
14 %undefine       with_python2
15 %undefine       with_python3
16 %endif
17 Summary:        Enhanced Seccomp (mode 2) Helper library
18 Summary(pl.UTF-8):      Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
19 Name:           libseccomp
20 Version:        2.5.3
21 Release:        3
22 License:        LGPL v2.1
23 Group:          Libraries
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:  5096d3912a605a72b27805fa0ef9886d
27 URL:            https://github.com/seccomp/libseccomp
28 BuildRequires:  gperf
29 BuildRequires:  pkgconfig
30 %if %{with python2}
31 BuildRequires:  python-Cython >= 0.29
32 BuildRequires:  python-devel >= 1:2.6
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-Cython >= 0.29
36 BuildRequires:  python3-devel >= 1:3.3
37 %endif
38 %if %{with python2} || %{with python3}
39 BuildRequires:  rpm-pythonprov
40 BuildRequires:  rpmbuild(macros) >= 1.714
41 %endif
42 %if %{with tests}
43 BuildRequires:  glibc-debuginfo
44 BuildRequires:  valgrind
45 %endif
46 ExclusiveArch:  %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 parisc parisc64 ppc ppc64 riscv64 s390 s390x
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 The libseccomp library provides and easy to use, platform independent,
51 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
52 The libseccomp API is designed to abstract away the underlying BPF
53 based syscall filter language and present a more conventional
54 function-call based filtering interface that should be familiar to,
55 and easily adopted by application developers.
56
57 %description -l pl.UTF-8
58 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
59 platformy interfejs do mechanizmu filtrowania wywołań systemowych
60 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
61 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
62 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
63 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
64 adaptowalny dla programistów aplikacji.
65
66 %package devel
67 Summary:        Header files for Seccomp library
68 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Seccomp
69 Group:          Development/Libraries
70 Requires:       %{name} = %{version}-%{release}
71
72 %description devel
73 Header files for Seccomp library.
74
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki Seccomp.
77
78 %package static
79 Summary:        Static Seccomp library
80 Summary(pl.UTF-8):      Statyczna biblioteka Seccomp
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 Static Seccomp library.
86
87 %description static -l pl.UTF-8
88 Statyczna biblioteka Seccomp.
89
90 %package -n python-seccomp
91 Summary:        Python binding for seccomp library
92 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki seccomp
93 Group:          Libraries/Python
94 Requires:       %{name} = %{version}-%{release}
95
96 %description -n python-seccomp
97 Python binding for seccomp library.
98
99 %description -n python-seccomp -l pl.UTF-8
100 Wiązanie Pythona do biblioteki seccomp.
101
102 %package -n python3-seccomp
103 Summary:        Python 3 binding for seccomp library
104 Summary(pl.UTF-8):      Wiązanie Pythona 3 do biblioteki seccomp
105 Group:          Libraries/Python
106 Requires:       %{name} = %{version}-%{release}
107
108 %description -n python3-seccomp
109 Python 3 binding for seccomp library.
110
111 %description -n python3-seccomp -l pl.UTF-8
112 Wiązanie Pythona 3 do biblioteki seccomp.
113
114 %prep
115 %setup -q
116
117 %build
118 %configure \
119         --disable-silent-rules \
120         --disable-python \
121         %{!?with_static_libs:--disable-static}
122 %{__make}
123
124 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
125 cd src/python
126 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
127 %if %{with python2}
128 %py_build
129 %endif
130
131 %if %{with python3}
132 %py3_build
133 %endif
134 cd ../../
135
136 %{?with_tests:%{__make} check}
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140 %{__make} install \
141         DESTDIR=$RPM_BUILD_ROOT
142
143 # obsoleted by pkg-config file
144 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
145
146 CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
147 cd src/python
148 VERSION_RELEASE="%{version}"; export VERSION_RELEASE
149 %if %{with python2}
150 %py_install
151
152 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
153 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
154
155 %py_postclean
156 %endif
157
158 %if %{with python3}
159 %py3_install
160 %endif
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %post   -p /sbin/ldconfig
166 %postun -p /sbin/ldconfig
167
168 %files
169 %defattr(644,root,root,755)
170 %doc CHANGELOG CREDITS README.md SECURITY.md
171 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
172 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
173 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
174 %{_mandir}/man1/scmp_sys_resolver.1*
175
176 %files devel
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/libseccomp.so
179 %{_includedir}/seccomp.h
180 %{_includedir}/seccomp-syscalls.h
181 %{_pkgconfigdir}/libseccomp.pc
182 %{_mandir}/man3/seccomp_*.3*
183
184 %if %{with static_libs}
185 %files static
186 %defattr(644,root,root,755)
187 %{_libdir}/libseccomp.a
188 %endif
189
190 %if %{with python2}
191 %files -n python-seccomp
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{py_sitedir}/seccomp.so
194 %{py_sitedir}/seccomp-%{version}-py*.egg-info
195 %endif
196
197 %if %{with python3}
198 %files -n python3-seccomp
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{py3_sitedir}/seccomp.*.so
201 %{py3_sitedir}/seccomp-%{version}-py*.egg-info
202 %endif
This page took 0.122947 seconds and 3 git commands to generate.