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