Added a note that I'm not going to do Python bindings for now.
[libguestfs.git] / libguestfs.spec.in
1 # @configure_input@
2
3 %global mirror http://hakodate/mirrors/fedora/10/Fedora/x86_64/os/
4
5 Summary:     Access and modify virtual machine disk images
6 Name:        libguestfs
7 Version:     @VERSION@
8 Release:     1%{?dist}
9 License:     LGPLv2+
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
14
15 # Basic build requirements:
16 BuildRequires: /usr/bin/pod2man
17 BuildRequires: /usr/bin/pod2text
18 BuildRequires: febootstrap
19
20 # If you want to build the bindings for different languages:
21 BuildRequires: ocaml
22 BuildRequires: perl-devel
23 BuildRequires: python-devel
24
25 # Runtime requires:
26 Requires:    qemu
27
28
29 %description
30 Libguestfs is a library for accessing and modifying guest disk images.
31 Amongst the things this is good for: making batch configuration
32 changes to guests, getting disk used/free statistics (see also:
33 virt-df), migrating between virtualization systems (see also:
34 virt-p2v), performing partial backups, performing partial guest
35 clones, cloning guests and changing registry/UUID/hostname info, and
36 much else besides.
37
38 Libguestfs uses Linux kernel and qemu code, and can access any type of
39 guest filesystem that Linux and qemu can, including but not limited
40 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
41 schemes, qcow, qcow2, vmdk.
42
43 Libguestfs provides ways to enumerate guest storage (eg. partitions,
44 LVs, what filesystem is in each LV, etc.).  It can also run commands
45 in the context of the guest.  Also you can access filesystems over FTP.
46
47 Libguestfs is a library that can be linked with C and C++ management
48 programs.
49
50 See also the 'guestfish' package for shell scripting and command line
51 access.
52
53
54 %package devel
55 Summary:     Development tools and libraries for %{name}
56 Group:       Development/Libraries
57 Requires:    %{name} = %{version}-%{release}
58
59
60 %description devel
61 %{name}-devel contains development tools and libraries
62 for %{name}.
63
64
65 %package -n guestfish
66 Summary:     Shell for accessing and modifying virtual machine disk images
67 Group:       Development/Tools
68 License:     GPLv2+
69 Requires:    %{name} = %{version}-%{release}
70 Requires:    /usr/bin/pod2text
71
72
73 %description -n guestfish
74 Guestfish is the Filesystem Interactive SHell, for accessing and
75 modifying virtual machine disk images from the command line and shell
76 scripts.
77
78
79 %package ocaml
80 Summary:     OCaml bindings for %{name}
81 Group:       Development/Libraries
82 Requires:    %{name} = %{version}-%{release}
83
84
85 %description ocaml
86 %{name}-ocaml contains OCaml bindings for %{name}.
87
88 This is for toplevel and scripting access only.  To compile OCaml
89 programs which use %{name} you will also need %{name}-ocaml-devel.
90
91
92 %package ocaml-devel
93 Summary:     OCaml bindings for %{name}
94 Group:       Development/Libraries
95 Requires:    %{name}-ocaml = %{version}-%{release}
96
97
98 %description ocaml-devel
99 %{name}-ocaml-devel contains development libraries
100 required to use the OCaml bindings for %{name}.
101
102
103 %package perl
104 Summary:     Perl bindings for %{name}
105 Group:       Development/Libraries
106 Requires:    %{name} = %{version}-%{release}
107
108
109 %description perl
110 %{name}-perl contains Perl bindings for %{name}.
111
112
113 %package python
114 Summary:     Python bindings for %{name}
115 Group:       Development/Libraries
116 Requires:    %{name} = %{version}-%{release}
117
118
119 %description python
120 %{name}-python contains Python bindings for %{name}.
121
122
123 %prep
124 %setup -q
125
126
127 %build
128 %configure --with-mirror=%{mirror}
129 make
130
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134 make DESTDIR=$RPM_BUILD_ROOT install
135
136 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
137 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
138
139 # Clean up the examples/ directory which will get installed in %doc.
140 pushd examples
141 make clean
142 rm Makefile*
143 rm -rf .deps .libs
144 popd
145
146
147 %clean
148 rm -rf $RPM_BUILD_ROOT
149
150
151 %post -p /sbin/ldconfig
152
153 %postun -p /sbin/ldconfig
154
155
156 %files
157 %defattr(-,root,root,-)
158 %doc COPYING
159 %{_libdir}/guestfs/
160 %{_libdir}/libguestfs.so.*
161
162
163 %files devel
164 %defattr(-,root,root,-)
165 %doc HACKING README examples
166 %{_libdir}/libguestfs.so
167 %{_mandir}/man3/guestfs.3*
168 %{_includedir}/guestfs.h
169 %{_includedir}/guestfs-actions.h
170 %{_includedir}/guestfs-structs.h
171
172
173 %files -n guestfish
174 %defattr(-,root,root,-)
175 %{_bindir}/guestfish
176 %{_mandir}/man1/guestfish.1*
177
178
179 %files ocaml
180 %defattr(-,root,root,-)
181
182
183 %files ocaml-devel
184 %defattr(-,root,root,-)
185
186
187 %files perl
188 %defattr(-,root,root,-)
189
190
191 %files python
192 %defattr(-,root,root,-)
193
194
195 %changelog
196 * Sat Apr  4 2009 Richard Jones <rjones@redhat.com> - @VERSION@-1
197 - Initial build.