]>
Commit | Line | Data |
---|---|---|
ed1c34d6 | 1 | # TODO: |
0c35b451 | 2 | # - finish haskell bindings (when finished upstream, not ready as of 1.30.4) |
96876fb6 | 3 | # - PLD appliance support? (needs at least package list adjustment) |
828f7f73 AF |
4 | # |
5 | # Conditional build: | |
6 | %bcond_with static_libs # build static libraries | |
94dfa124 | 7 | %bcond_with appliance # appliance build (no PLD support) |
eeb3750e | 8 | %bcond_without erlang # Erlang binding |
021c56b6 | 9 | %bcond_with golang # Go language binding |
476156c6 | 10 | %bcond_with haskell # Haskell (GHC) binding [incomplete, nothing is installed] |
bb948a37 | 11 | %bcond_with java # Java binding (broken linking, missing symbols) |
3722f906 | 12 | %bcond_without lua # Lua binding |
3eebe7b8 | 13 | %bcond_without ocaml # OCaml binding and tools |
0d2eca2c | 14 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) |
3eebe7b8 | 15 | %bcond_without perl # Perl binding |
fb441c61 | 16 | %bcond_with php # PHP binding |
3eebe7b8 | 17 | %bcond_without python # Python binding |
46d973c4 | 18 | %bcond_without ruby # Ruby binding |
294b5374 | 19 | %bcond_with rust # Rust binding |
840f16bc | 20 | %bcond_without systemtap # systemtap/dtrace probes |
11cb7a09 | 21 | %bcond_without vala # vala binding |
3722f906 | 22 | |
288a6aa1 | 23 | %if 0%{!?php_name:1} |
312283b5 | 24 | %define php_name php55 |
288a6aa1 | 25 | %endif |
0d2eca2c JR |
26 | |
27 | %ifarch x32 | |
28 | %undefine with_erlang | |
0d2eca2c JR |
29 | %undefine with_ocaml_opt |
30 | %endif | |
31 | ||
c0027147 JP |
32 | %ifnarch %{go_arches} |
33 | %undefine with_golang | |
34 | %endif | |
35 | ||
0a000f53 JP |
36 | %{?with_java:%{?use_default_jdk}} |
37 | ||
3eebe7b8 JB |
38 | Summary: Library and tools for accessing and modifying virtual machine disk images |
39 | Summary(pl.UTF-8): Biblioteka i narzędzia do dostępu i modyfikacji obrazów dysków maszyn wirtualnych | |
828f7f73 | 40 | Name: libguestfs |
be66bbfd | 41 | Version: 1.46.0 |
0f85188f | 42 | Release: 5 |
828f7f73 AF |
43 | License: LGPL v2+ |
44 | Group: Libraries | |
a1365a7b | 45 | Source0: https://libguestfs.org/download/1.46-stable/%{name}-%{version}.tar.gz |
be66bbfd | 46 | # Source0-md5: 3d6f99ed705206d11904c67e69ba64da |
828f7f73 | 47 | Patch0: ncurses.patch |
475fb908 | 48 | Patch1: augeas-libxml2.patch |
ebef088a JR |
49 | Patch2: %{name}-completionsdir.patch |
50 | Patch3: x32.patch | |
a1365a7b | 51 | URL: https://libguestfs.org/ |
3722f906 | 52 | BuildRequires: acl-devel |
c0027147 | 53 | BuildRequires: augeas-devel >= 1.2.0 |
3eebe7b8 | 54 | BuildRequires: autoconf >= 2.50 |
828f7f73 | 55 | BuildRequires: automake |
893a36ad | 56 | BuildRequires: bison |
828f7f73 | 57 | BuildRequires: cdrkit-mkisofs |
c0027147 | 58 | BuildRequires: cpio |
893a36ad | 59 | BuildRequires: flex |
53a36759 | 60 | BuildRequires: gettext-tools |
ed1c34d6 JB |
61 | BuildRequires: glib2-devel >= 1:2.26.0 |
62 | BuildRequires: gobject-introspection-devel >= 1.30.0 | |
828f7f73 | 63 | BuildRequires: gperf |
3722f906 | 64 | BuildRequires: hivex-devel >= 1.2.7 |
c0027147 | 65 | BuildRequires: jansson-devel >= 2.7 |
3722f906 | 66 | BuildRequires: libcap-devel |
828f7f73 | 67 | BuildRequires: libconfig-devel |
7eea6f71 | 68 | BuildRequires: libfuse-devel |
828f7f73 AF |
69 | BuildRequires: libmagic-devel |
70 | BuildRequires: libselinux-devel | |
c0027147 | 71 | BuildRequires: libstdc++-devel |
b62eed34 | 72 | BuildRequires: libtirpc-devel |
828f7f73 | 73 | BuildRequires: libtool |
3722f906 | 74 | BuildRequires: libvirt-devel >= 0.10.2 |
3eebe7b8 | 75 | BuildRequires: libxml2-devel >= 2.0 |
828f7f73 | 76 | BuildRequires: libxml2-progs |
312283b5 | 77 | BuildRequires: ncurses-devel |
c0027147 JP |
78 | BuildRequires: ocaml >= 1:4.01 |
79 | BuildRequires: ocaml-findlib | |
80 | BuildRequires: ocaml-hivex-devel | |
81 | BuildRequires: pcre2-8-devel | |
312283b5 | 82 | BuildRequires: perl-base |
c0027147 | 83 | BuildRequires: perl-modules |
312283b5 ER |
84 | BuildRequires: perl-tools-pod |
85 | BuildRequires: pkgconfig | |
86 | BuildRequires: po4a | |
87 | BuildRequires: qemu-img >= 1.0 | |
88 | BuildRequires: readline-devel | |
c0027147 | 89 | BuildRequires: rpcsvc-proto |
11cb7a09 | 90 | BuildRequires: rpm-build >= 4.6 |
c0027147 | 91 | BuildRequires: rpm-devel >= 4.6.0 |
0a000f53 | 92 | BuildRequires: rpmbuild(macros) >= 2.021 |
c0027147 | 93 | BuildRequires: sleuthkit-devel |
312283b5 | 94 | # libsystemd-journal |
91c752f6 | 95 | BuildRequires: systemd-devel >= 1:196 |
11cb7a09 | 96 | %{?with_vala:BuildRequires: vala} |
c0027147 JP |
97 | BuildRequires: xz |
98 | BuildRequires: yara-devel | |
312283b5 ER |
99 | %if %{with appliance} |
100 | BuildRequires: supermin >= 5.1.0 | |
101 | %endif | |
102 | %if %{with erlang} | |
103 | # erl_interface package | |
104 | BuildRequires: erlang | |
105 | %endif | |
106 | %if %{with golang} | |
107 | BuildRequires: golang | |
108 | %endif | |
109 | %if %{with haskell} | |
110 | BuildRequires: ghc | |
111 | %endif | |
112 | %if %{with java} | |
0a000f53 | 113 | %{?use_jdk:%buildrequires_jdk}%{!?use_jdk:BuildRequires: jdk} |
312283b5 ER |
114 | BuildRequires: rpm-javaprov |
115 | %endif | |
3722f906 | 116 | %if %{with lua} |
294b5374 JR |
117 | BuildRequires: lua |
118 | BuildRequires: lua-devel | |
3722f906 | 119 | %endif |
3eebe7b8 | 120 | %if %{with ocaml} |
dee6324e | 121 | BuildRequires: ocaml-camlp4 |
2f00bfcd | 122 | BuildRequires: ocaml-fileutils-devel |
ef731dae | 123 | BuildRequires: ocaml-gettext-devel |
0c35b451 | 124 | BuildRequires: ocaml-libvirt-devel >= 0.6.1.4-4 |
828f7f73 | 125 | BuildRequires: ocaml-pcre-devel |
3eebe7b8 | 126 | %endif |
3eebe7b8 JB |
127 | %if %{with perl} |
128 | BuildRequires: perl-ExtUtils-MakeMaker | |
ce74d8eb | 129 | BuildRequires: perl-Module-Build |
3eebe7b8 | 130 | BuildRequires: perl-Test-Simple |
dee6324e | 131 | BuildRequires: rpm-perlprov |
3eebe7b8 | 132 | %endif |
312283b5 ER |
133 | %if %{with php} |
134 | BuildRequires: %{php_name}-devel | |
135 | BuildRequires: %{php_name}-program | |
136 | %endif | |
3eebe7b8 | 137 | %if %{with python} |
be66bbfd JR |
138 | BuildRequires: python3 |
139 | BuildRequires: python3-devel | |
c0027147 | 140 | BuildRequires: python3-modules |
4fd3b612 | 141 | BuildRequires: rpm-pythonprov |
3eebe7b8 | 142 | %endif |
3eebe7b8 | 143 | %if %{with ruby} |
416d999f | 144 | BuildRequires: rpm-rubyprov |
3eebe7b8 JB |
145 | BuildRequires: ruby |
146 | BuildRequires: ruby-devel | |
731de1b8 | 147 | BuildRequires: ruby-irb |
3eebe7b8 | 148 | BuildRequires: ruby-rake |
333efa05 JB |
149 | BuildRequires: ruby-rdoc |
150 | BuildRequires: ruby-rubygems | |
3eebe7b8 | 151 | %endif |
c0027147 JP |
152 | %if %{with rust} |
153 | BuildRequires: cargo | |
154 | BuildRequires: rust | |
155 | %endif | |
312283b5 ER |
156 | %if %{with systemtap} |
157 | BuildRequires: systemtap-sdt-devel | |
893a36ad | 158 | %endif |
c0027147 | 159 | Requires: jansson >= 2.7 |
3722f906 | 160 | Requires: qemu-common >= 1.1.0 |
ef731dae | 161 | Requires: yajl >= 2.0.4 |
ed1c34d6 JB |
162 | Suggests: db-utils |
163 | Suggests: icoutils | |
164 | Suggests: netpbm-progs | |
b62eed34 | 165 | Obsoletes: libguestfs-apidocs < 1.40.2 |
828f7f73 AF |
166 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
167 | ||
b2308e25 JP |
168 | %ifarch %{ix86} |
169 | %define qemu_bin /usr/bin/qemu-system-i386 | |
170 | %endif | |
171 | %ifarch %{x8664} x32 | |
172 | %define qemu_bin /usr/bin/qemu-system-x86_64 | |
173 | %endif | |
42740ff6 JP |
174 | %ifarch aarch64 |
175 | %define qemu_bin /usr/bin/qemu-system-aarch64 | |
176 | %endif | |
177 | %ifarch %{arm} | |
178 | %define qemu_bin /usr/bin/qemu-system-arm | |
179 | %endif | |
b2308e25 | 180 | |
828f7f73 | 181 | %description |
3eebe7b8 JB |
182 | libguestfs is a library and set of tools for accessing and modifying |
183 | virtual machine (VM) disk images. You can use this for viewing and | |
184 | editing files inside guests, scripting changes to VMs, monitoring disk | |
828f7f73 AF |
185 | used/free statistics, P2V, V2V, performing partial backups, cloning |
186 | VMs, and much else besides. | |
187 | ||
99abc14f | 188 | %description -l pl.UTF-8 |
3eebe7b8 JB |
189 | libguestfs to biblioteka oraz zestaw narzędzi do dostępu oraz |
190 | modyfikowania obrazów dysków maszyn wirtualnych (VM). Można je | |
191 | wykorzystywać do oglądania i edycji plików wewnątrz gości, zmian | |
192 | skryptowych w VM-ach, monitorowania statystyk używanego/dostępnego | |
193 | miejsca na dyskach, P2V, V2V, wykonywania częściowych kopii | |
194 | zapasowych, klonowania VM-ów i wielu podobnych operacji. | |
99abc14f | 195 | |
828f7f73 AF |
196 | %package devel |
197 | Summary: Header files for libguestfs library | |
198 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libguestfs | |
199 | Group: Development/Libraries | |
200 | Requires: %{name} = %{version}-%{release} | |
201 | ||
202 | %description devel | |
203 | Header files for libguestfs library. | |
204 | ||
205 | %description devel -l pl.UTF-8 | |
206 | Pliki nagłówkowe biblioteki libguestfs. | |
207 | ||
208 | %package static | |
209 | Summary: Static libguestfs library | |
210 | Summary(pl.UTF-8): Statyczna biblioteka libguestfs | |
211 | Group: Development/Libraries | |
212 | Requires: %{name}-devel = %{version}-%{release} | |
213 | ||
214 | %description static | |
215 | Static libguestfs library. | |
216 | ||
217 | %description static -l pl.UTF-8 | |
218 | Statyczna biblioteka libguestfs. | |
219 | ||
ed1c34d6 JB |
220 | %package gobject |
221 | Summary: GObject bindings to libguestfs library | |
222 | Summary(pl.UTF-8): Wiązania GObject do biblioteki libguestfs | |
223 | Group: Libraries | |
224 | Requires: %{name} = %{version}-%{release} | |
225 | Requires: glib2 >= 1:2.26.0 | |
226 | ||
227 | %description gobject | |
228 | GObject bindings to libguestfs library. | |
229 | ||
230 | %description gobject -l pl.UTF-8 | |
231 | Wiązania GObject do biblioteki libguestfs. | |
232 | ||
233 | %package gobject-devel | |
234 | Summary: Header files for libguestfs-gobject library | |
235 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libguestfs-gobject | |
236 | Group: Development/Libraries | |
237 | Requires: %{name}-devel = %{version}-%{release} | |
238 | Requires: %{name}-gobject = %{version}-%{release} | |
239 | Requires: glib2-devel >= 1:2.26.0 | |
240 | ||
241 | %description gobject-devel | |
242 | Header files for libguestfs-gobject library. | |
243 | ||
244 | %description gobject-devel -l pl.UTF-8 | |
245 | Pliki nagłówkowe biblioteki libguestfs-gobject. | |
246 | ||
247 | %package gobject-static | |
248 | Summary: Static libguestfs-gobject library | |
249 | Summary(pl.UTF-8): Statyczna biblioteka libguestfs-gobject | |
250 | Group: Development/Libraries | |
251 | Requires: %{name}-gobject-devel = %{version}-%{release} | |
252 | ||
253 | %description gobject-static | |
254 | Static libguestfs-gobject library. | |
255 | ||
256 | %description gobject-static -l pl.UTF-8 | |
257 | Statyczna biblioteka libguestfs-gobject. | |
258 | ||
3eebe7b8 JB |
259 | %package tools |
260 | Summary: libguestfs tools for accessing and modifying virtual machine disk images | |
261 | Summary(pl.UTF-8): Narzędzia libguestfs do dostępu i modyfikacji obrazów dysków maszyn wirtualnych | |
262 | Group: Applications/System | |
263 | Requires: %{name} = %{version}-%{release} | |
c0027147 | 264 | Requires: augeas-libs >= 1.2.0 |
3eebe7b8 | 265 | %{?with_ocaml:Requires: ocaml-libguestfs = %{version}-%{release}} |
91c752f6 | 266 | %if %{with ocaml} |
0c35b451 | 267 | Requires: ocaml-libvirt >= 0.6.1.4-4 |
91c752f6 JB |
268 | Suggests: unzip |
269 | Suggests: xz | |
270 | Suggests: zip | |
271 | %endif | |
3eebe7b8 JB |
272 | |
273 | %description tools | |
274 | libguestfs tools for accessing and modifying virtual machine (VM) disk | |
275 | images. You can use this for viewing and editing files inside guests, | |
be66bbfd JR |
276 | scripting changes to VMs, monitoring disk used/free statistics, |
277 | performing partial backups, cloning VMs, and much else besides. | |
3eebe7b8 JB |
278 | |
279 | %description tools -l pl.UTF-8 | |
280 | Zestaw narzędzi libguestfs do dostępu oraz modyfikowania obrazów | |
281 | dysków maszyn wirtualnych (VM). Można je wykorzystywać do oglądania i | |
282 | edycji plików wewnątrz gości, zmian skryptowych w VM-ach, | |
be66bbfd JR |
283 | monitorowania statystyk używanego/dostępnego miejsca na dyskach, |
284 | wykonywania częściowych kopii zapasowych, klonowania VM-ów i wielu | |
285 | podobnych operacji. | |
3eebe7b8 | 286 | |
eeb3750e JB |
287 | %package -n erlang-libguestfs |
288 | Summary: Erlang bindings for libguestfs | |
289 | Summary(pl.UTF-8): Wiązania Erlanga do libguestfs | |
290 | Group: Development/Languages | |
291 | Requires: %{name} = %{version}-%{release} | |
292 | ||
293 | %description -n erlang-libguestfs | |
294 | Erlang bindings for libguestfs. | |
295 | ||
296 | %description -n erlang-libguestfs -l pl.UTF-8 | |
297 | Wiązania Erlanga do libguestfs. | |
298 | ||
840f16bc JB |
299 | %package -n golang-libguestfs |
300 | Summary: Go language bindings for libguestfs | |
301 | Summary(pl.UTF-8): Wiązania języka Go do libguestfs | |
302 | Group: Development/Languages | |
303 | Requires: %{name} = %{version}-%{release} | |
304 | ||
305 | %description -n golang-libguestfs | |
306 | Go language bindings for libguestfs. | |
307 | ||
308 | %description -n golang-libguestfs -l pl.UTF-8 | |
309 | Wiązania języka Go do libguestfs. | |
310 | ||
828f7f73 AF |
311 | %package -n java-libguestfs |
312 | Summary: Java bindings for libguestfs | |
99abc14f | 313 | Summary(pl.UTF-8): Wiązania Javy do libguestfs |
828f7f73 AF |
314 | Group: Libraries/Java |
315 | Requires: %{name} = %{version}-%{release} | |
316 | ||
317 | %description -n java-libguestfs | |
318 | Java bindings for libguestfs. | |
319 | ||
99abc14f JB |
320 | %description -n java-libguestfs -l pl.UTF-8 |
321 | Wiązania Javy do libguestfs. | |
322 | ||
828f7f73 AF |
323 | %package -n java-libguestfs-javadoc |
324 | Summary: Java bindings for libguestfs - documentation | |
99abc14f | 325 | Summary(pl.UTF-8): Wiązania Javy do libguestfs - dokumentacja |
828f7f73 AF |
326 | Group: Documentation |
327 | ||
328 | %description -n java-libguestfs-javadoc | |
329 | Java bindings for libguestfs - documentation. | |
330 | ||
99abc14f JB |
331 | %description -n java-libguestfs-javadoc -l pl.UTF-8 |
332 | Wiązania Javy do libguestfs - dokumentacja. | |
333 | ||
3722f906 JB |
334 | %package -n lua-libguestfs |
335 | Summary: Lua bindings for libguestfs | |
336 | Summary(pl.UTF-8): Wiązania języka Lua do libguestfs | |
337 | Group: Development/Languages | |
338 | Requires: %{name} = %{version}-%{release} | |
339 | ||
340 | %description -n lua-libguestfs | |
341 | Lua bindings for libguestfs. | |
342 | ||
343 | %description -n lua-libguestfs -l pl.UTF-8 | |
344 | Wiązania języka Lua do libguestfs. | |
345 | ||
828f7f73 AF |
346 | %package -n ocaml-libguestfs |
347 | Summary: OCaml bindings for libguestfs | |
99abc14f | 348 | Summary(pl.UTF-8): Wiązania OCamla do libguestfs |
828f7f73 AF |
349 | Group: Libraries |
350 | Requires: %{name} = %{version}-%{release} | |
351 | ||
352 | %description -n ocaml-libguestfs | |
353 | OCaml bindings for libguestfs. | |
354 | ||
99abc14f JB |
355 | %description -n ocaml-libguestfs -l pl.UTF-8 |
356 | Wiązania OCamla do libguestfs. | |
357 | ||
828f7f73 | 358 | %package -n ocaml-libguestfs-devel |
99abc14f JB |
359 | Summary: Development files OCaml libguestfs bindings |
360 | Summary(pl.UTF-8): Pliki programistyczne wiązań OCamla do libguestfs | |
828f7f73 AF |
361 | Group: Development/Libraries |
362 | Requires: ocaml-%{name} = %{version}-%{release} | |
363 | ||
364 | %description -n ocaml-libguestfs-devel | |
99abc14f | 365 | Development files OCaml libguestfs bindings. |
828f7f73 AF |
366 | |
367 | %description -n ocaml-libguestfs-devel -l pl.UTF-8 | |
99abc14f | 368 | Pliki programistyczne wiązań OCamla do libguestfs. |
828f7f73 | 369 | |
99abc14f JB |
370 | %package -n perl-libguestfs |
371 | Summary: Perl bindings for libguestfs | |
372 | Summary(pl.UTF-8): Wiązania Perla do libguestfs | |
373 | Group: Development/Languages/Perl | |
828f7f73 | 374 | Requires: %{name} = %{version}-%{release} |
3eebe7b8 JB |
375 | Suggests: perl-Sys-Virt |
376 | Suggests: perl-XML-XPath | |
3722f906 | 377 | Suggests: perl-hivex >= 1.2.7 |
828f7f73 | 378 | |
99abc14f JB |
379 | %description -n perl-libguestfs |
380 | Perl bindings for libguestfs. | |
381 | ||
382 | %description -n perl-libguestfs -l pl.UTF-8 | |
383 | Wiązania Perla do libguestfs. | |
828f7f73 | 384 | |
312283b5 | 385 | %package -n %{php_name}-guestfs |
7eea6f71 | 386 | Summary: PHP bindings for libguestfs |
99abc14f | 387 | Summary(pl.UTF-8): Wiązania PHP do libguestfs |
7eea6f71 | 388 | Group: Development/Languages/PHP |
389 | Requires: %{name} = %{version}-%{release} | |
46d973c4 | 390 | %{?requires_php_extension} |
7eea6f71 | 391 | |
312283b5 | 392 | %description -n %{php_name}-guestfs |
7eea6f71 | 393 | PHP bindings for libguestfs. |
394 | ||
312283b5 | 395 | %description -n %{php_name}-guestfs -l pl.UTF-8 |
99abc14f JB |
396 | Wiązania PHP do libguestfs. |
397 | ||
be66bbfd | 398 | %package -n python3-libguestfs |
99abc14f JB |
399 | Summary: Python bindings for libguestfs |
400 | Summary(pl.UTF-8): Wiązania Pythona do libguestfs | |
401 | Group: Development/Languages/Python | |
402 | Requires: %{name} = %{version}-%{release} | |
403 | ||
be66bbfd | 404 | %description -n python3-libguestfs |
99abc14f JB |
405 | Python bindings for libguestfs. |
406 | ||
be66bbfd | 407 | %description -n python3-libguestfs -l pl.UTF-8 |
99abc14f JB |
408 | Wiązania Pythona do libguestfs. |
409 | ||
46d973c4 JB |
410 | %package -n ruby-libguestfs |
411 | Summary: Ruby bindings for libguestfs | |
412 | Summary(pl.UTF-8): Wiązania języka Ruby do libguestfs | |
413 | Group: Development/Languages | |
414 | Requires: %{name} = %{version}-%{release} | |
415 | %{?ruby_ver_requires_eq} | |
416 | ||
417 | %description -n ruby-libguestfs | |
418 | Ruby bindings for libguestfs. | |
419 | ||
420 | %description -n ruby-libguestfs -l pl.UTF-8 | |
421 | Wiązania języka Ruby do libguestfs. | |
422 | ||
11cb7a09 JP |
423 | %package -n vala-libguestfs |
424 | Summary: Vala bindings for libguestfs | |
425 | Summary(pl.UTF-8): Wiązania języka Vala do libguestfs | |
426 | Group: Development/Languages | |
427 | Requires: %{name}-devel = %{version}-%{release} | |
428 | BuildArch: noarch | |
429 | ||
430 | %description -n vala-libguestfs | |
431 | Vala bindings for libguestfs. | |
432 | ||
433 | %description -n vala-libguestfs -l pl.UTF-8 | |
434 | Wiązania języka Vala do libguestfs. | |
435 | ||
828f7f73 AF |
436 | %package -n bash-completion-libguestfs |
437 | Summary: bash-completion for libguestfs tools | |
99abc14f | 438 | Summary(pl.UTF-8): Bashowe uzupełnianie argumentów dla narzędzi libguestfs |
828f7f73 | 439 | Group: Applications/Shells |
c0027147 | 440 | Requires: bash-completion >= 1:2.0 |
15226ef8 | 441 | BuildArch: noarch |
828f7f73 AF |
442 | |
443 | %description -n bash-completion-libguestfs | |
444 | bash-completion for guestfish tool. | |
445 | ||
99abc14f JB |
446 | %description -n bash-completion-libguestfs -l pl.UTF-8 |
447 | Bashowe uzupełnianie argumentów dla narzędzi libguestfs. | |
448 | ||
828f7f73 AF |
449 | %prep |
450 | %setup -q | |
451 | %patch0 -p1 | |
475fb908 | 452 | %patch1 -p1 |
ebef088a | 453 | %patch2 -p1 |
51a590f6 | 454 | %ifarch x32 |
3722f906 | 455 | %patch3 -p1 |
51a590f6 | 456 | %endif |
2ed85024 | 457 | |
828f7f73 | 458 | %build |
91c752f6 | 459 | # preserve dir across libtoolize |
475fb908 | 460 | %{__libtoolize} |
671fd6ca | 461 | %{__aclocal} -I m4 |
475fb908 JR |
462 | %{__autoconf} |
463 | %{__autoheader} | |
464 | %{__automake} | |
828f7f73 AF |
465 | %configure \ |
466 | vmchannel_test=no \ | |
91c752f6 JB |
467 | DB_DUMP=/usr/bin/db_dump \ |
468 | DB_LOAD=/usr/bin/db_load \ | |
ed1c34d6 JB |
469 | PBMTEXT=/usr/bin/pbmtext \ |
470 | PNMTOPNG=/usr/bin/pnmtopng \ | |
471 | BMPTOPNM=/usr/bin/bmptopnm \ | |
472 | PAMCUT=/usr/bin/pamcut \ | |
c253e12c | 473 | SUPERMIN=/usr/bin/supermin \ |
91c752f6 | 474 | UNZIP=/usr/bin/unzip \ |
ed1c34d6 | 475 | WRESTOOL=/usr/bin/wrestool \ |
b2308e25 | 476 | QEMU=%{?qemu_bin}%{!?qemu_bin:/usr/bin/qemu} \ |
91c752f6 | 477 | ZIP=/usr/bin/zip \ |
be66bbfd | 478 | PYTHON=%{__python3} \ |
3c07e7dc | 479 | --with-completionsdir=%{_datadir}/bash-completion/completions \ |
3722f906 | 480 | --with-java=%{?with_java:%{java_home}}%{!?with_java:no} \ |
be66bbfd | 481 | --with-python-installdir=%{py3_sitedir} \ |
96e43ae7 | 482 | --enable-install-daemon \ |
94dfa124 | 483 | %{!?with_appliance:--disable-appliance} \ |
46d973c4 | 484 | %{!?with_erlang:--disable-erlang} \ |
840f16bc | 485 | %{!?with_golang:--disable-golang} \ |
3eebe7b8 | 486 | %{!?with_haskell:--disable-haskell} \ |
3722f906 | 487 | %{!?with_lua:--disable-lua} \ |
3eebe7b8 JB |
488 | %{!?with_ocaml:--disable-ocaml} \ |
489 | %{!?with_perl:--disable-perl} \ | |
490 | %{!?with_php:--disable-php} \ | |
840f16bc | 491 | %{!?with_systemtap:--disable-probes} \ |
3eebe7b8 JB |
492 | %{!?with_python:--disable-python} \ |
493 | %{!?with_ruby:--disable-ruby} \ | |
294b5374 | 494 | %{!?with_rust:--disable-rust} \ |
11cb7a09 | 495 | %{!?with_vala:--disable-vala} \ |
3eebe7b8 JB |
496 | --disable-silent-rules \ |
497 | %{__enable_disable static_libs static} | |
828f7f73 | 498 | |
bb0ce0dc | 499 | %{__make} -j1 \ |
828f7f73 AF |
500 | INSTALLDIRS=vendor |
501 | ||
502 | %install | |
503 | rm -rf $RPM_BUILD_ROOT | |
504 | ||
505 | %{__make} install \ | |
506 | INSTALLDIRS=vendor \ | |
7eea6f71 | 507 | DESTDIR=$RPM_BUILD_ROOT \ |
312283b5 | 508 | phpdir=%{php_sysconfdir}/conf.d |
828f7f73 | 509 | |
3722f906 JB |
510 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
511 | %if %{with lua} | |
512 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/*/*.la | |
513 | %endif | |
514 | %if %{with python} | |
be66bbfd JR |
515 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la |
516 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
3722f906 | 517 | %endif |
3eebe7b8 | 518 | |
91c752f6 JB |
519 | %if %{without appliance} |
520 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man1/libguestfs-make-fixed-appliance.1 | |
521 | %endif | |
0c35b451 JB |
522 | %if %{with ocaml} |
523 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dll*.so.owner | |
524 | %else | |
aa3c28c6 | 525 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ocaml.3 |
91c752f6 JB |
526 | %endif |
527 | %if %{without ruby} | |
528 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ruby.3 | |
529 | %endif | |
530 | ||
7a7e981d JP |
531 | install -d $RPM_BUILD_ROOT%{_libdir}/guestfs |
532 | ||
828f7f73 AF |
533 | %find_lang %{name} |
534 | ||
535 | %clean | |
536 | rm -rf $RPM_BUILD_ROOT | |
537 | ||
538 | %post -p /sbin/ldconfig | |
539 | %postun -p /sbin/ldconfig | |
540 | ||
ed1c34d6 JB |
541 | %post gobject -p /sbin/ldconfig |
542 | %postun gobject -p /sbin/ldconfig | |
543 | ||
544 | %post -n java-libguestfs -p /sbin/ldconfig | |
545 | %postun -n java-libguestfs -p /sbin/ldconfig | |
546 | ||
828f7f73 AF |
547 | %files -f %{name}.lang |
548 | %defattr(644,root,root,755) | |
be66bbfd | 549 | %doc AUTHORS README TODO |
3eebe7b8 JB |
550 | %attr(755,root,root) %{_libdir}/libguestfs.so.*.*.* |
551 | %attr(755,root,root) %ghost %{_libdir}/libguestfs.so.0 | |
7a7e981d | 552 | %dir %{_libdir}/guestfs |
be66bbfd | 553 | %{_mandir}/man1/guestfs-release-notes*.1* |
021c56b6 | 554 | %{_mandir}/man1/guestfs-security.1* |
be66bbfd | 555 | %lang(ja) %{_mandir}/ja/man1/guestfs-release-notes*.1* |
021c56b6 | 556 | %lang(ja) %{_mandir}/ja/man1/guestfs-security.1* |
be66bbfd | 557 | %lang(uk) %{_mandir}/uk/man1/guestfs-release-notes*.1* |
021c56b6 | 558 | %lang(uk) %{_mandir}/uk/man1/guestfs-security.1* |
3eebe7b8 JB |
559 | |
560 | %files devel | |
561 | %defattr(644,root,root,755) | |
562 | %attr(755,root,root) %{_libdir}/libguestfs.so | |
563 | %{_includedir}/guestfs.h | |
564 | %{_pkgconfigdir}/libguestfs.pc | |
021c56b6 JR |
565 | %{_mandir}/man1/guestfs-hacking.1* |
566 | %{_mandir}/man1/guestfs-internals.1* | |
3eebe7b8 | 567 | %{_mandir}/man3/guestfs.3* |
ed1c34d6 | 568 | %{_mandir}/man3/guestfs-examples.3* |
3eebe7b8 | 569 | %{_mandir}/man3/libguestfs.3* |
021c56b6 JR |
570 | %lang(ja) %{_mandir}/ja/man1/guestfs-hacking.1* |
571 | %lang(ja) %{_mandir}/ja/man1/guestfs-internals.1* | |
ed1c34d6 JB |
572 | %lang(ja) %{_mandir}/ja/man3/guestfs.3* |
573 | %lang(ja) %{_mandir}/ja/man3/guestfs-examples.3* | |
021c56b6 JR |
574 | %lang(uk) %{_mandir}/uk/man1/guestfs-hacking.1* |
575 | %lang(uk) %{_mandir}/uk/man1/guestfs-internals.1* | |
ed1c34d6 JB |
576 | %lang(uk) %{_mandir}/uk/man3/guestfs.3* |
577 | %lang(uk) %{_mandir}/uk/man3/guestfs-examples.3* | |
3eebe7b8 JB |
578 | |
579 | %if %{with static_libs} | |
580 | %files static | |
581 | %defattr(644,root,root,755) | |
582 | %{_libdir}/libguestfs.a | |
583 | %endif | |
584 | ||
ed1c34d6 JB |
585 | %files gobject |
586 | %defattr(644,root,root,755) | |
587 | %attr(755,root,root) %{_libdir}/libguestfs-gobject-1.0.so.*.*.* | |
588 | %attr(755,root,root) %ghost %{_libdir}/libguestfs-gobject-1.0.so.0 | |
589 | %{_libdir}/girepository-1.0/Guestfs-1.0.typelib | |
590 | ||
591 | %files gobject-devel | |
592 | %defattr(644,root,root,755) | |
593 | %attr(755,root,root) %{_libdir}/libguestfs-gobject-1.0.so | |
594 | %{_includedir}/guestfs-gobject.h | |
595 | %{_includedir}/guestfs-gobject | |
596 | %{_datadir}/gir-1.0/Guestfs-1.0.gir | |
476156c6 | 597 | %{_pkgconfigdir}/libguestfs-gobject-1.0.pc |
c8ad52f5 | 598 | %{_mandir}/man3/guestfs-gobject.3* |
ed1c34d6 JB |
599 | |
600 | %if %{with static_libs} | |
601 | %files gobject-static | |
602 | %defattr(644,root,root,755) | |
603 | %{_libdir}/libguestfs-gobject-1.0.a | |
604 | %endif | |
605 | ||
3eebe7b8 JB |
606 | %files tools |
607 | %defattr(644,root,root,755) | |
828f7f73 AF |
608 | %attr(755,root,root) %{_bindir}/guestfish |
609 | %attr(755,root,root) %{_bindir}/guestmount | |
160dc631 | 610 | %attr(755,root,root) %{_bindir}/guestunmount |
828f7f73 | 611 | %attr(755,root,root) %{_bindir}/libguestfs-test-tool |
828f7f73 AF |
612 | %attr(755,root,root) %{_bindir}/virt-copy-in |
613 | %attr(755,root,root) %{_bindir}/virt-copy-out | |
828f7f73 | 614 | %attr(755,root,root) %{_bindir}/virt-rescue |
828f7f73 AF |
615 | %attr(755,root,root) %{_bindir}/virt-tar-in |
616 | %attr(755,root,root) %{_bindir}/virt-tar-out | |
3eebe7b8 JB |
617 | %attr(755,root,root) %{_sbindir}/guestfsd |
618 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libguestfs-tools.conf | |
828f7f73 | 619 | %{_mandir}/man1/guestfish.1* |
ed1c34d6 JB |
620 | %{_mandir}/man1/guestfs-faq.1* |
621 | %{_mandir}/man1/guestfs-performance.1* | |
828f7f73 | 622 | %{_mandir}/man1/guestfs-recipes.1* |
ed1c34d6 | 623 | %{_mandir}/man1/guestfs-testing.1* |
828f7f73 | 624 | %{_mandir}/man1/guestmount.1* |
160dc631 | 625 | %{_mandir}/man1/guestunmount.1* |
828f7f73 | 626 | %{_mandir}/man1/libguestfs-test-tool.1* |
828f7f73 AF |
627 | %{_mandir}/man1/virt-copy-in.1* |
628 | %{_mandir}/man1/virt-copy-out.1* | |
828f7f73 | 629 | %{_mandir}/man1/virt-rescue.1* |
828f7f73 AF |
630 | %{_mandir}/man1/virt-tar-in.1* |
631 | %{_mandir}/man1/virt-tar-out.1* | |
840f16bc | 632 | %{_mandir}/man5/libguestfs-tools.conf.5* |
3722f906 | 633 | %{_mandir}/man8/guestfsd.8* |
828f7f73 | 634 | %lang(ja) %{_mandir}/ja/man1/guestfish.1* |
ed1c34d6 JB |
635 | %lang(ja) %{_mandir}/ja/man1/guestfs-faq.1* |
636 | %lang(ja) %{_mandir}/ja/man1/guestfs-performance.1* | |
637 | %lang(ja) %{_mandir}/ja/man1/guestfs-recipes.1* | |
638 | %lang(ja) %{_mandir}/ja/man1/guestfs-testing.1* | |
828f7f73 | 639 | %lang(ja) %{_mandir}/ja/man1/guestmount.1* |
160dc631 | 640 | %lang(ja) %{_mandir}/ja/man1/guestunmount.1* |
ed1c34d6 | 641 | %lang(ja) %{_mandir}/ja/man1/libguestfs-test-tool.1* |
828f7f73 AF |
642 | %lang(ja) %{_mandir}/ja/man1/virt-copy-in.1* |
643 | %lang(ja) %{_mandir}/ja/man1/virt-copy-out.1* | |
828f7f73 | 644 | %lang(ja) %{_mandir}/ja/man1/virt-rescue.1* |
828f7f73 AF |
645 | %lang(ja) %{_mandir}/ja/man1/virt-tar-in.1* |
646 | %lang(ja) %{_mandir}/ja/man1/virt-tar-out.1* | |
840f16bc | 647 | %lang(ja) %{_mandir}/ja/man5/libguestfs-tools.conf.5* |
828f7f73 | 648 | %lang(uk) %{_mandir}/uk/man1/guestfish.1* |
ed1c34d6 JB |
649 | %lang(uk) %{_mandir}/uk/man1/guestfs-faq.1* |
650 | %lang(uk) %{_mandir}/uk/man1/guestfs-performance.1* | |
651 | %lang(uk) %{_mandir}/uk/man1/guestfs-recipes.1* | |
652 | %lang(uk) %{_mandir}/uk/man1/guestfs-testing.1* | |
828f7f73 | 653 | %lang(uk) %{_mandir}/uk/man1/guestmount.1* |
160dc631 | 654 | %lang(uk) %{_mandir}/uk/man1/guestunmount.1* |
ed1c34d6 | 655 | %lang(uk) %{_mandir}/uk/man1/libguestfs-test-tool.1* |
828f7f73 AF |
656 | %lang(uk) %{_mandir}/uk/man1/virt-copy-in.1* |
657 | %lang(uk) %{_mandir}/uk/man1/virt-copy-out.1* | |
828f7f73 | 658 | %lang(uk) %{_mandir}/uk/man1/virt-rescue.1* |
828f7f73 AF |
659 | %lang(uk) %{_mandir}/uk/man1/virt-tar-in.1* |
660 | %lang(uk) %{_mandir}/uk/man1/virt-tar-out.1* | |
840f16bc | 661 | %lang(uk) %{_mandir}/uk/man5/libguestfs-tools.conf.5* |
91c752f6 | 662 | |
8c5754c4 JB |
663 | %if %{with appliance} |
664 | %attr(755,root,root) %{_sbindir}/libguestfs-make-fixed-appliance | |
665 | %{_mandir}/man1/libguestfs-make-fixed-appliance.1* | |
666 | %lang(ja) %{_mandir}/ja/man1/libguestfs-make-fixed-appliance.1* | |
667 | %lang(uk) %{_mandir}/uk/man1/libguestfs-make-fixed-appliance.1* | |
668 | /lib/udev/rules.d/99-guestfs-serial.rules | |
669 | %dir %{_libdir}/guestfs | |
670 | %dir %{_libdir}/guestfs/supermin.d | |
671 | %{_libdir}/guestfs/supermin.d/daemon.img | |
672 | %{_libdir}/guestfs/supermin.d/init.img | |
673 | %{_libdir}/guestfs/supermin.d/udev-rules.img | |
674 | %{_libdir}/guestfs/supermin.d/base.img | |
675 | %{_libdir}/guestfs/supermin.d/hostfiles | |
676 | %endif | |
828f7f73 | 677 | |
eeb3750e JB |
678 | %if %{with erlang} |
679 | %files -n erlang-libguestfs | |
680 | %defattr(644,root,root,755) | |
681 | %attr(755,root,root) %{_bindir}/erl-guestfs | |
682 | %{_libdir}/erlang/lib/libguestfs-%{version} | |
683 | %{_mandir}/man3/guestfs-erlang.3* | |
684 | %lang(ja) %{_mandir}/ja/man3/guestfs-erlang.3* | |
685 | %lang(uk) %{_mandir}/uk/man3/guestfs-erlang.3* | |
686 | %endif | |
687 | ||
840f16bc JB |
688 | %if %{with golang} |
689 | %files -n golang-libguestfs | |
690 | %defattr(644,root,root,755) | |
691 | %dir %{_libdir}/golang/pkg/linux_*/libguestfs.org | |
692 | %dir %{_libdir}/golang/pkg/linux_*/libguestfs.org/guestfs | |
693 | %{_libdir}/golang/pkg/linux_*/libguestfs.org/guestfs/guestfs.a | |
c5f23768 | 694 | %{_libdir}/golang/src/libguestfs.org |
840f16bc JB |
695 | %{_mandir}/man3/guestfs-golang.3* |
696 | %lang(ja) %{_mandir}/ja/man3/guestfs-golang.3* | |
697 | %lang(uk) %{_mandir}/uk/man3/guestfs-golang.3* | |
698 | %endif | |
699 | ||
3eebe7b8 | 700 | %if %{with java} |
828f7f73 AF |
701 | %files -n java-libguestfs |
702 | %defattr(644,root,root,755) | |
ed1c34d6 JB |
703 | %attr(755,root,root) %{_libdir}/libguestfs_jni.so.*.*.* |
704 | %attr(755,root,root) %ghost %{_libdir}/libguestfs_jni.so.1 | |
3eebe7b8 | 705 | %attr(755,root,root) %{_libdir}/libguestfs_jni.so |
ed1c34d6 | 706 | %{_javadir}/libguestfs-%{version}.jar |
828f7f73 | 707 | %{_mandir}/man3/guestfs-java.3* |
ed1c34d6 JB |
708 | %lang(ja) %{_mandir}/ja/man3/guestfs-java.3* |
709 | %lang(uk) %{_mandir}/uk/man3/guestfs-java.3* | |
828f7f73 AF |
710 | |
711 | %files -n java-libguestfs-javadoc | |
712 | %defattr(644,root,root,755) | |
840f16bc | 713 | %{_javadocdir}/libguestfs |
3eebe7b8 | 714 | %endif |
828f7f73 | 715 | |
3722f906 JB |
716 | %if %{with lua} |
717 | %files -n lua-libguestfs | |
718 | %defattr(644,root,root,755) | |
719 | %attr(755,root,root) %{_libdir}/lua/*/guestfs.so | |
720 | %{_mandir}/man3/guestfs-lua.3* | |
721 | %lang(ja) %{_mandir}/ja/man3/guestfs-lua.3* | |
722 | %lang(uk) %{_mandir}/uk/man3/guestfs-lua.3* | |
723 | %endif | |
724 | ||
3eebe7b8 | 725 | %if %{with ocaml} |
828f7f73 AF |
726 | %files -n ocaml-libguestfs |
727 | %defattr(644,root,root,755) | |
084d2444 | 728 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlguestfs.so |
0c35b451 JB |
729 | %dir %{_libdir}/ocaml/guestfs |
730 | %{_libdir}/ocaml/guestfs/META | |
731 | %{_libdir}/ocaml/guestfs/mlguestfs.cma | |
828f7f73 AF |
732 | |
733 | %files -n ocaml-libguestfs-devel | |
734 | %defattr(644,root,root,755) | |
828f7f73 | 735 | %{_libdir}/ocaml/guestfs/guestfs.cmi |
828f7f73 AF |
736 | %{_libdir}/ocaml/guestfs/guestfs.mli |
737 | %{_libdir}/ocaml/guestfs/libmlguestfs.a | |
0d2eca2c JR |
738 | %if %{with ocaml_opt} |
739 | %{_libdir}/ocaml/guestfs/guestfs.cmx | |
740 | %{_libdir}/ocaml/guestfs/mlguestfs.a | |
828f7f73 | 741 | %{_libdir}/ocaml/guestfs/mlguestfs.cmxa |
0d2eca2c | 742 | %endif |
3eebe7b8 | 743 | %{_mandir}/man3/guestfs-ocaml.3* |
ed1c34d6 JB |
744 | %lang(ja) %{_mandir}/ja/man3/guestfs-ocaml.3* |
745 | %lang(uk) %{_mandir}/uk/man3/guestfs-ocaml.3* | |
3eebe7b8 | 746 | %endif |
828f7f73 | 747 | |
3eebe7b8 JB |
748 | %if %{with perl} |
749 | %files -n perl-libguestfs | |
828f7f73 | 750 | %defattr(644,root,root,755) |
3eebe7b8 | 751 | %{perl_vendorarch}/Sys/Guestfs.pm |
3eebe7b8 | 752 | %dir %{perl_vendorarch}/auto/Sys/Guestfs |
3eebe7b8 JB |
753 | %attr(755,root,root) %{perl_vendorarch}/auto/Sys/Guestfs/Guestfs.so |
754 | %{_mandir}/man3/guestfs-perl.3* | |
755 | %{_mandir}/man3/Sys::Guestfs.3pm* | |
ed1c34d6 JB |
756 | %lang(ja) %{_mandir}/ja/man3/guestfs-perl.3* |
757 | %lang(uk) %{_mandir}/uk/man3/guestfs-perl.3* | |
3eebe7b8 | 758 | %endif |
828f7f73 | 759 | |
46d973c4 | 760 | %if %{with php} |
312283b5 | 761 | %files -n %{php_name}-guestfs |
7eea6f71 | 762 | %defattr(644,root,root,755) |
312283b5 ER |
763 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/guestfs_php.ini |
764 | %attr(755,root,root) %{php_extensiondir}/guestfs_php.so | |
46d973c4 | 765 | %endif |
7eea6f71 | 766 | |
3eebe7b8 | 767 | %if %{with python} |
be66bbfd | 768 | %files -n python3-libguestfs |
3eebe7b8 | 769 | %defattr(644,root,root,755) |
be66bbfd JR |
770 | %attr(755,root,root) %{py3_sitedir}/libguestfsmod*.so |
771 | %{py3_sitedir}/guestfs.py | |
772 | %{py3_sitedir}/__pycache__ | |
3eebe7b8 | 773 | %{_mandir}/man3/guestfs-python.3* |
ed1c34d6 JB |
774 | %lang(ja) %{_mandir}/ja/man3/guestfs-python.3* |
775 | %lang(uk) %{_mandir}/uk/man3/guestfs-python.3* | |
3eebe7b8 JB |
776 | %endif |
777 | ||
46d973c4 JB |
778 | %if %{with ruby} |
779 | %files -n ruby-libguestfs | |
780 | %defattr(644,root,root,755) | |
333efa05 JB |
781 | %attr(755,root,root) %{ruby_vendorarchdir}/_guestfs.so |
782 | %{ruby_vendorlibdir}/guestfs.rb | |
46d973c4 JB |
783 | %{_mandir}/man3/guestfs-ruby.3* |
784 | %lang(ja) %{_mandir}/ja/man3/guestfs-ruby.3* | |
785 | %lang(uk) %{_mandir}/uk/man3/guestfs-ruby.3* | |
786 | %endif | |
787 | ||
11cb7a09 JP |
788 | %if %{with vala} |
789 | %files -n vala-libguestfs | |
790 | %defattr(644,root,root,755) | |
791 | %{_datadir}/vala/vapi/libguestfs-gobject-1.0.deps | |
792 | %{_datadir}/vala/vapi/libguestfs-gobject-1.0.vapi | |
793 | %endif | |
794 | ||
828f7f73 AF |
795 | %files -n bash-completion-libguestfs |
796 | %defattr(644,root,root,755) | |
d297ffb2 ER |
797 | %{bash_compdir}/guestfish |
798 | %{bash_compdir}/guestmount | |
ab117f46 | 799 | %{bash_compdir}/guestunmount |
d297ffb2 | 800 | %{bash_compdir}/virt-* |