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