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
20 BuildRequires: readline-devel
23 # These are only required if you want to build the bindings for
24 # different languages:
26 BuildRequires: ocaml-findlib-devel
27 BuildRequires: perl-devel
28 BuildRequires: perl-Test-Simple
29 BuildRequires: perl-Test-Pod
30 BuildRequires: perl-Test-Pod-Coverage
31 BuildRequires: perl-ExtUtils-MakeMaker
32 BuildRequires: python-devel
39 Libguestfs is a library for accessing and modifying guest disk images.
40 Amongst the things this is good for: making batch configuration
41 changes to guests, getting disk used/free statistics (see also:
42 virt-df), migrating between virtualization systems (see also:
43 virt-p2v), performing partial backups, performing partial guest
44 clones, cloning guests and changing registry/UUID/hostname info, and
47 Libguestfs uses Linux kernel and qemu code, and can access any type of
48 guest filesystem that Linux and qemu can, including but not limited
49 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
50 schemes, qcow, qcow2, vmdk.
52 Libguestfs provides ways to enumerate guest storage (eg. partitions,
53 LVs, what filesystem is in each LV, etc.). It can also run commands
54 in the context of the guest. Also you can access filesystems over FTP.
56 Libguestfs is a library that can be linked with C and C++ management
59 See also the 'guestfish' package for shell scripting and command line
62 For Perl bindings, see 'libguestfs-perl'.
64 For OCaml bindings, see 'libguestfs-ocaml-devel'.
66 For Python bindings, see 'libguestfs-python'.
70 Summary: Development tools and libraries for %{name}
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
76 %{name}-devel contains development tools and libraries
81 Summary: Shell for accessing and modifying virtual machine disk images
82 Group: Development/Tools
84 Requires: %{name} = %{version}-%{release}
85 Requires: /usr/bin/pod2text
88 %description -n guestfish
89 Guestfish is the Filesystem Interactive SHell, for accessing and
90 modifying virtual machine disk images from the command line and shell
95 Summary: OCaml bindings for %{name}
96 Group: Development/Libraries
97 Requires: %{name} = %{version}-%{release}
101 %{name}-ocaml contains OCaml bindings for %{name}.
103 This is for toplevel and scripting access only. To compile OCaml
104 programs which use %{name} you will also need %{name}-ocaml-devel.
108 Summary: OCaml bindings for %{name}
109 Group: Development/Libraries
110 Requires: %{name}-ocaml = %{version}-%{release}
113 %description ocaml-devel
114 %{name}-ocaml-devel contains development libraries
115 required to use the OCaml bindings for %{name}.
119 Summary: Perl bindings for %{name}
120 Group: Development/Libraries
121 Requires: %{name} = %{version}-%{release}
122 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
126 %{name}-perl contains Perl bindings for %{name}.
130 Summary: Python bindings for %{name}
131 Group: Development/Libraries
132 Requires: %{name} = %{version}-%{release}
134 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
135 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
138 %{name}-python contains Python bindings for %{name}.
146 #%configure --with-mirror=%{mirror}
149 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
151 make INSTALLDIRS=vendor
155 test -n "$QUICK_RPMBUILD" || make check
159 rm -rf $RPM_BUILD_ROOT
161 make DESTDIR=$RPM_BUILD_ROOT install
163 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
164 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
166 # Clean up the examples/ directory which will get installed in %doc.
167 # Note we can't delete the original examples/Makefile because that
168 # will be needed by the check section later in the RPM build.
176 # Same for ocaml/examples.
177 cp -a ocaml/examples ocaml/ex
183 find $RPM_BUILD_ROOT -name perllocal.pod -delete
184 find $RPM_BUILD_ROOT -name .packlist -delete
186 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a
187 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la
189 mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
190 mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
191 $RPM_BUILD_ROOT%{python_sitelib}/
195 rm -rf $RPM_BUILD_ROOT
198 %post -p /sbin/ldconfig
200 %postun -p /sbin/ldconfig
204 %defattr(-,root,root,-)
207 %{_libdir}/libguestfs.so.*
211 %defattr(-,root,root,-)
212 %doc HACKING TODO README ex html/guestfs.3.html html/pod.css
213 %doc src/generator.ml
214 %{_libdir}/libguestfs.so
215 %{_mandir}/man3/guestfs.3*
216 %{_includedir}/guestfs.h
217 %{_includedir}/guestfs-actions.h
218 %{_includedir}/guestfs-structs.h
222 %defattr(-,root,root,-)
223 %doc html/guestfish.1.html html/pod.css
225 %{_mandir}/man1/guestfish.1*
229 %defattr(-,root,root,-)
230 %{_libdir}/ocaml/guestfs
231 %exclude %{_libdir}/ocaml/guestfs/*.a
232 %exclude %{_libdir}/ocaml/guestfs/*.cmxa
233 %exclude %{_libdir}/ocaml/guestfs/*.cmx
234 %exclude %{_libdir}/ocaml/guestfs/*.mli
235 %{_libdir}/ocaml/stublibs/*.so
236 %{_libdir}/ocaml/stublibs/*.so.owner
240 %defattr(-,root,root,-)
242 %{_libdir}/ocaml/guestfs/*.a
243 %{_libdir}/ocaml/guestfs/*.cmxa
244 %{_libdir}/ocaml/guestfs/*.cmx
245 %{_libdir}/ocaml/guestfs/*.mli
249 %defattr(-,root,root,-)
252 %{_mandir}/man3/Sys::Guestfs.3pm*
256 %defattr(-,root,root,-)
258 %{python_sitelib}/*.py
259 %{python_sitelib}/*.pyc
260 %{python_sitelib}/*.pyo
264 * Sat Apr 4 2009 Richard Jones <rjones@redhat.com> - @VERSION@-1