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