Mostly working spec file.
[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 BuildRequires: /usr/bin/pod2man
16 BuildRequires: /usr/bin/pod2text
17 BuildRequires: febootstrap
18
19 Requires:    qemu
20
21
22 %description
23 Libguestfs is a library for accessing and modifying guest disk images.
24 Amongst the things this is good for: making batch configuration
25 changes to guests, getting disk used/free statistics (see also:
26 virt-df), migrating between virtualization systems (see also:
27 virt-p2v), performing partial backups, performing partial guest
28 clones, cloning guests and changing registry/UUID/hostname info, and
29 much else besides.
30
31 Libguestfs uses Linux kernel and qemu code, and can access any type of
32 guest filesystem that Linux and qemu can, including but not limited
33 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
34 schemes, qcow, qcow2, vmdk.
35
36 Libguestfs provides ways to enumerate guest storage (eg. partitions,
37 LVs, what filesystem is in each LV, etc.).  It can also run commands
38 in the context of the guest.  Also you can access filesystems over FTP.
39
40 Libguestfs is a library that can be linked with C and C++ management
41 programs.
42
43 See also the 'guestfish' package for shell scripting and command line
44 access.
45
46
47 %package devel
48 Summary:     Development tools and libraries for %{name}
49 Group:       Development/Libraries
50 Requires:    %{name} = %{version}-%{release}
51
52
53 %description devel
54 %{name}-devel contains development tools and libraries
55 for %{name}.
56
57
58 %package -n guestfish
59 Summary:     Shell for accessing and modifying virtual machine disk images
60 Group:       Development/Tools
61 License:     GPLv2+
62 Requires:    %{name} = %{version}-%{release}
63 Requires:    /usr/bin/pod2text
64
65
66 %description -n guestfish
67 Guestfish is the Filesystem Interactive SHell, for accessing and
68 modifying virtual machine disk images from the command line and shell
69 scripts.
70
71
72 %prep
73 %setup -q
74
75
76 %build
77 %configure --with-mirror=%{mirror}
78 make
79
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 make DESTDIR=$RPM_BUILD_ROOT install
84
85 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
86 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
87
88 # Clean up the examples/ directory which will get installed in %doc.
89 pushd examples
90 make clean
91 rm Makefile*
92 rm -rf .deps .libs
93 popd
94
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99
100 %files
101 %defattr(-,root,root,-)
102 %doc COPYING
103 %{_libdir}/guestfs/
104 %{_libdir}/libguestfs.so.*
105
106
107 %files devel
108 %defattr(-,root,root,-)
109 %doc HACKING README examples
110 %{_libdir}/libguestfs.so
111 %{_mandir}/man3/guestfs.3*
112
113
114 %files -n guestfish
115 %defattr(-,root,root,-)
116 %{_bindir}/guestfish
117
118
119 %changelog
120 * Sat Apr  4 2009 Richard Jones <rjones@redhat.com> - @VERSION@-1
121 - Initial build.