X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=libguestfs.spec.in;h=3a79276939f481eee0581ea6cc72d5cb3db8dc8c;hp=f4659bfc576071241a09b9db00a19825a18d6014;hb=92804dec7c4982d2039f81586bc4a5cacb46217b;hpb=f1a10c6285cca30f8c9491ae08951137457bb018 diff --git a/libguestfs.spec.in b/libguestfs.spec.in index f4659bf..3a79276 100644 --- a/libguestfs.spec.in +++ b/libguestfs.spec.in @@ -1,7 +1,5 @@ # @configure_input@ -#%global mirror http://hakodate/mirrors/fedora/10/Fedora/x86_64/os/ - Summary: Access and modify virtual machine disk images Name: libguestfs Version: @VERSION@ @@ -17,19 +15,31 @@ BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2text BuildRequires: febootstrap >= 1.5 BuildRequires: augeas-devel >= 0.5.0 -BuildRequires: qemu - -# If you want to build the bindings for different languages: +BuildRequires: readline-devel +BuildRequires: qemu >= 0.10-7 +BuildRequires: createrepo + +# Build requirements for the appliance: +# (see 'make-initramfs.sh.in' in the source) +BuildRequires: kernel, bash, coreutils, lvm2, ntfs-3g, util-linux-ng +BuildRequires: MAKEDEV, net-tools, augeas-libs, file +BuildRequires: module-init-tools, procps, strace, iputils + +# These are only required if you want to build the bindings for +# different languages: BuildRequires: ocaml BuildRequires: ocaml-findlib-devel BuildRequires: perl-devel +BuildRequires: perl-Test-Simple BuildRequires: perl-Test-Pod BuildRequires: perl-Test-Pod-Coverage BuildRequires: perl-ExtUtils-MakeMaker -# BuildRequires: python-devel +BuildRequires: python-devel +BuildRequires: ruby-devel +BuildRequires: rubygem-rake # Runtime requires: -Requires: qemu +Requires: qemu >= 0.10-7 %description @@ -56,6 +66,14 @@ programs. See also the 'guestfish' package for shell scripting and command line access. +For Perl bindings, see 'libguestfs-perl'. + +For OCaml bindings, see 'libguestfs-ocaml-devel'. + +For Python bindings, see 'libguestfs-python'. + +For Ruby bindings, see 'libguestfs-ruby'. + %package devel Summary: Development tools and libraries for %{name} @@ -117,14 +135,30 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version) %{name}-perl contains Perl bindings for %{name}. -# %package python -# Summary: Python bindings for %{name} -# Group: Development/Libraries -# Requires: %{name} = %{version}-%{release} +%package python +Summary: Python bindings for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%description python +%{name}-python contains Python bindings for %{name}. -# %description python -# %{name}-python contains Python bindings for %{name}. + +%package ruby +Summary: Ruby bindings for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: ruby(abi) = 1.8 +Provides: ruby(guestfs) = %{version} + +%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")} +%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")} + +%description ruby +%{name}-ruby contains Ruby bindings for %{name}. %prep @@ -132,7 +166,6 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version) %build -#%configure --with-mirror=%{mirror} %configure # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir @@ -141,7 +174,7 @@ make INSTALLDIRS=vendor %check -make check +test -n "$QUICK_RPMBUILD" || make check %install @@ -172,6 +205,21 @@ popd find $RPM_BUILD_ROOT -name perllocal.pod -delete find $RPM_BUILD_ROOT -name .packlist -delete +rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a +rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la + +if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then + mkdir -p $RPM_BUILD_ROOT%{python_sitelib} + mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \ + $RPM_BUILD_ROOT%{python_sitelib}/ +fi + +# Install ruby bindings by hand. +mkdir -p $RPM_BUILD_ROOT%{ruby_sitelib} +mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch} +install -p -m0644 ruby/lib/guestfs.rb $RPM_BUILD_ROOT%{ruby_sitelib} +install -p -m0755 ruby/ext/guestfs/_guestfs.so $RPM_BUILD_ROOT%{ruby_sitearch} + %clean rm -rf $RPM_BUILD_ROOT @@ -191,7 +239,8 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) -%doc HACKING README ex html/guestfs.3.html html/pod.css +%doc HACKING TODO README ex html/guestfs.3.html html/pod.css +%doc src/generator.ml %{_libdir}/libguestfs.so %{_mandir}/man3/guestfs.3* %{_includedir}/guestfs.h @@ -233,10 +282,26 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/Sys::Guestfs.3pm* -# %files python -# %defattr(-,root,root,-) +%files python +%defattr(-,root,root,-) +%{python_sitearch}/* +%{python_sitelib}/*.py +%{python_sitelib}/*.pyc +%{python_sitelib}/*.pyo + + +%files ruby +%defattr(-,root,root,-) +%{ruby_sitelib}/guestfs.rb +%{ruby_sitearch}/_guestfs.so %changelog -* Sat Apr 4 2009 Richard Jones - @VERSION@-1 +* Thu Apr 16 2009 Richard Jones - @VERSION@-1 +- New upstream version @VERSION@. + +* Thu Apr 16 2009 Richard Jones - 0.9.9-12 +- Multiple fixes to get it to scratch build in Koji. + +* Sat Apr 4 2009 Richard Jones - 0.9.9-1 - Initial build.