3 #%global mirror http://hakodate/mirrors/fedora/10/Fedora/x86_64/os/
5 Summary: Access and modify virtual machine disk images
10 Group: Development/Libraries
11 URL: http://et.redhat.com/~rjones/libguestfs/
12 Source0: http://et.redhat.com/~rjones/libguestfs/files/%{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15 # Basic build requirements:
16 BuildRequires: /usr/bin/pod2man
17 BuildRequires: /usr/bin/pod2text
18 BuildRequires: febootstrap >= 1.5
19 BuildRequires: augeas-devel >= 0.5.0
22 # If you want to build the bindings for different languages:
24 BuildRequires: ocaml-findlib-devel
25 BuildRequires: perl-devel
26 BuildRequires: perl-Test-Simple
27 BuildRequires: perl-Test-Pod
28 BuildRequires: perl-Test-Pod-Coverage
29 BuildRequires: perl-ExtUtils-MakeMaker
30 BuildRequires: python-devel
37 Libguestfs is a library for accessing and modifying guest disk images.
38 Amongst the things this is good for: making batch configuration
39 changes to guests, getting disk used/free statistics (see also:
40 virt-df), migrating between virtualization systems (see also:
41 virt-p2v), performing partial backups, performing partial guest
42 clones, cloning guests and changing registry/UUID/hostname info, and
45 Libguestfs uses Linux kernel and qemu code, and can access any type of
46 guest filesystem that Linux and qemu can, including but not limited
47 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
48 schemes, qcow, qcow2, vmdk.
50 Libguestfs provides ways to enumerate guest storage (eg. partitions,
51 LVs, what filesystem is in each LV, etc.). It can also run commands
52 in the context of the guest. Also you can access filesystems over FTP.
54 Libguestfs is a library that can be linked with C and C++ management
57 See also the 'guestfish' package for shell scripting and command line
60 For Perl bindings, see 'libguestfs-perl'.
62 For OCaml bindings, see 'libguestfs-ocaml-devel'.
64 For Python bindings, see 'libguestfs-python'.
68 Summary: Development tools and libraries for %{name}
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
74 %{name}-devel contains development tools and libraries
79 Summary: Shell for accessing and modifying virtual machine disk images
80 Group: Development/Tools
82 Requires: %{name} = %{version}-%{release}
83 Requires: /usr/bin/pod2text
86 %description -n guestfish
87 Guestfish is the Filesystem Interactive SHell, for accessing and
88 modifying virtual machine disk images from the command line and shell
93 Summary: OCaml bindings for %{name}
94 Group: Development/Libraries
95 Requires: %{name} = %{version}-%{release}
99 %{name}-ocaml contains OCaml bindings for %{name}.
101 This is for toplevel and scripting access only. To compile OCaml
102 programs which use %{name} you will also need %{name}-ocaml-devel.
106 Summary: OCaml bindings for %{name}
107 Group: Development/Libraries
108 Requires: %{name}-ocaml = %{version}-%{release}
111 %description ocaml-devel
112 %{name}-ocaml-devel contains development libraries
113 required to use the OCaml bindings for %{name}.
117 Summary: Perl bindings for %{name}
118 Group: Development/Libraries
119 Requires: %{name} = %{version}-%{release}
120 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
124 %{name}-perl contains Perl bindings for %{name}.
128 Summary: Python bindings for %{name}
129 Group: Development/Libraries
130 Requires: %{name} = %{version}-%{release}
132 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
133 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
136 %{name}-python contains Python bindings for %{name}.
144 #%configure --with-mirror=%{mirror}
147 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
149 make INSTALLDIRS=vendor
153 test -n "$QUICK_RPMBUILD" || make check
157 rm -rf $RPM_BUILD_ROOT
159 make DESTDIR=$RPM_BUILD_ROOT install
161 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
162 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
164 # Clean up the examples/ directory which will get installed in %doc.
165 # Note we can't delete the original examples/Makefile because that
166 # will be needed by the check section later in the RPM build.
174 # Same for ocaml/examples.
175 cp -a ocaml/examples ocaml/ex
181 find $RPM_BUILD_ROOT -name perllocal.pod -delete
182 find $RPM_BUILD_ROOT -name .packlist -delete
184 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a
185 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la
187 mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
188 mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
189 $RPM_BUILD_ROOT%{python_sitelib}/
193 rm -rf $RPM_BUILD_ROOT
196 %post -p /sbin/ldconfig
198 %postun -p /sbin/ldconfig
202 %defattr(-,root,root,-)
205 %{_libdir}/libguestfs.so.*
209 %defattr(-,root,root,-)
210 %doc HACKING TODO README ex html/guestfs.3.html html/pod.css
211 %doc src/generator.ml
212 %{_libdir}/libguestfs.so
213 %{_mandir}/man3/guestfs.3*
214 %{_includedir}/guestfs.h
215 %{_includedir}/guestfs-actions.h
216 %{_includedir}/guestfs-structs.h
220 %defattr(-,root,root,-)
221 %doc html/guestfish.1.html html/pod.css
223 %{_mandir}/man1/guestfish.1*
227 %defattr(-,root,root,-)
228 %{_libdir}/ocaml/guestfs
229 %exclude %{_libdir}/ocaml/guestfs/*.a
230 %exclude %{_libdir}/ocaml/guestfs/*.cmxa
231 %exclude %{_libdir}/ocaml/guestfs/*.cmx
232 %exclude %{_libdir}/ocaml/guestfs/*.mli
233 %{_libdir}/ocaml/stublibs/*.so
234 %{_libdir}/ocaml/stublibs/*.so.owner
238 %defattr(-,root,root,-)
240 %{_libdir}/ocaml/guestfs/*.a
241 %{_libdir}/ocaml/guestfs/*.cmxa
242 %{_libdir}/ocaml/guestfs/*.cmx
243 %{_libdir}/ocaml/guestfs/*.mli
247 %defattr(-,root,root,-)
250 %{_mandir}/man3/Sys::Guestfs.3pm*
254 %defattr(-,root,root,-)
256 %{python_sitelib}/*.py
257 %{python_sitelib}/*.pyc
258 %{python_sitelib}/*.pyo
262 * Sat Apr 4 2009 Richard Jones <rjones@redhat.com> - @VERSION@-1