- Don't include generator.ml in rpm. It's 400K and almost no one will need

it.
- Add comments to spec file about how repo building works.
- Whitespace changes in the spec file.
This commit is contained in:
Richard W.M. Jones 2010-02-25 16:38:21 +00:00
parent ba930f1bf9
commit e9b1deb686

View File

@ -34,19 +34,19 @@
%global runtests 1 %global runtests 1
%endif %endif
Summary: Access and modify virtual machine disk images Summary: Access and modify virtual machine disk images
Name: libguestfs Name: libguestfs
Epoch: 1 Epoch: 1
Version: 1.0.84 Version: 1.0.84
Release: 3%{?dist} Release: 4%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
URL: http://libguestfs.org/ URL: http://libguestfs.org/
Source0: http://libguestfs.org/download/%{name}-%{version}.tar.gz Source0: http://libguestfs.org/download/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# Disable FUSE tests, not supported in Koji at the moment. # Disable FUSE tests, not supported in Koji at the moment.
Patch0: libguestfs-1.0.79-no-fuse-test.patch Patch0: libguestfs-1.0.79-no-fuse-test.patch
# Basic build requirements: # Basic build requirements:
BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2man
@ -119,7 +119,7 @@ Requires: qemu-kvm >= 0.10-7
Requires: genisoimage Requires: genisoimage
# Provide our own custom requires for the supermin appliance. # Provide our own custom requires for the supermin appliance.
Source1: libguestfs-find-requires.sh Source1: libguestfs-find-requires.sh
%global _use_internal_dependency_generator 0 %global _use_internal_dependency_generator 0
%global __find_provides %{_rpmconfigdir}/find-provides %global __find_provides %{_rpmconfigdir}/find-provides
%global __find_requires %{SOURCE1} %{_rpmconfigdir}/find-requires %global __find_requires %{SOURCE1} %{_rpmconfigdir}/find-requires
@ -162,10 +162,10 @@ For Java bindings, see 'libguestfs-java-devel'.
%package devel %package devel
Summary: Development tools and libraries for %{name} Summary: Development tools and libraries for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
%description devel %description devel
@ -174,12 +174,12 @@ for %{name}.
%package -n guestfish %package -n guestfish
Summary: Shell for accessing and modifying virtual machine disk images Summary: Shell for accessing and modifying virtual machine disk images
Group: Development/Tools Group: Development/Tools
License: GPLv2+ License: GPLv2+
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: /usr/bin/pod2text Requires: /usr/bin/pod2text
Requires: virt-inspector Requires: virt-inspector
%description -n guestfish %description -n guestfish
@ -189,11 +189,11 @@ scripts.
%package mount %package mount
Summary: Mount guest filesystems on the host using FUSE and libguestfs Summary: Mount guest filesystems on the host using FUSE and libguestfs
Group: Development/Tools Group: Development/Tools
License: GPLv2+ License: GPLv2+
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: virt-inspector Requires: virt-inspector
%description mount %description mount
@ -202,29 +202,29 @@ host using FUSE and %{name}.
%package tools %package tools
Summary: System administration tools for virtual machines Summary: System administration tools for virtual machines
Group: Development/Tools Group: Development/Tools
License: GPLv2+ License: GPLv2+
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: guestfish Requires: guestfish
Requires: perl-Sys-Virt Requires: perl-Sys-Virt
Requires: perl-XML-Writer Requires: perl-XML-Writer
# Obsolete and replace earlier packages. # Obsolete and replace earlier packages.
Provides: virt-cat = %{epoch}:%{version}-%{release} Provides: virt-cat = %{epoch}:%{version}-%{release}
Obsoletes: virt-cat < %{epoch}:%{version}-%{release} Obsoletes: virt-cat < %{epoch}:%{version}-%{release}
Provides: virt-df = %{epoch}:%{version}-%{release} Provides: virt-df = %{epoch}:%{version}-%{release}
Obsoletes: virt-df < %{epoch}:%{version}-%{release} Obsoletes: virt-df < %{epoch}:%{version}-%{release}
Provides: virt-inspector = %{epoch}:%{version}-%{release} Provides: virt-inspector = %{epoch}:%{version}-%{release}
Obsoletes: virt-inspector < %{epoch}:%{version}-%{release} Obsoletes: virt-inspector < %{epoch}:%{version}-%{release}
# RHBZ#514309 # RHBZ#514309
Provides: virt-df2 = %{epoch}:%{version}-%{release} Provides: virt-df2 = %{epoch}:%{version}-%{release}
Obsoletes: virt-df2 < %{epoch}:%{version}-%{release} Obsoletes: virt-df2 < %{epoch}:%{version}-%{release}
# These were never packages: # These were never packages:
Provides: virt-edit = %{epoch}:%{version}-%{release} Provides: virt-edit = %{epoch}:%{version}-%{release}
Provides: virt-rescue = %{epoch}:%{version}-%{release} Provides: virt-rescue = %{epoch}:%{version}-%{release}
%description tools %description tools
@ -264,9 +264,9 @@ Windows virtual machines.
%package -n ocaml-%{name} %package -n ocaml-%{name}
Summary: OCaml bindings for %{name} Summary: OCaml bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n ocaml-%{name} %description -n ocaml-%{name}
@ -277,9 +277,9 @@ programs which use %{name} you will also need ocaml-%{name}-devel.
%package -n ocaml-%{name}-devel %package -n ocaml-%{name}-devel
Summary: OCaml bindings for %{name} Summary: OCaml bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: ocaml-%{name} = %{epoch}:%{version}-%{release} Requires: ocaml-%{name} = %{epoch}:%{version}-%{release}
%description -n ocaml-%{name}-devel %description -n ocaml-%{name}-devel
@ -288,12 +288,12 @@ required to use the OCaml bindings for %{name}.
%package -n perl-%{name} %package -n perl-%{name}
Summary: Perl bindings for %{name} Summary: Perl bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# RHBZ#523547 # RHBZ#523547
Requires: perl-XML-XPath Requires: perl-XML-XPath
%description -n perl-%{name} %description -n perl-%{name}
@ -301,9 +301,9 @@ perl-%{name} contains Perl bindings for %{name}.
%package -n python-%{name} %package -n python-%{name}
Summary: Python bindings for %{name} Summary: Python bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?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)")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
@ -313,11 +313,11 @@ python-%{name} contains Python bindings for %{name}.
%package -n ruby-%{name} %package -n ruby-%{name}
Summary: Ruby bindings for %{name} Summary: Ruby bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: ruby(abi) = 1.8 Requires: ruby(abi) = 1.8
Provides: ruby(guestfs) = %{version} Provides: ruby(guestfs) = %{version}
%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")} %{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")} %{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
@ -327,11 +327,11 @@ ruby-%{name} contains Ruby bindings for %{name}.
%package java %package java
Summary: Java bindings for %{name} Summary: Java bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: java >= 1.5.0 Requires: java >= 1.5.0
Requires: jpackage-utils Requires: jpackage-utils
%description java %description java
%{name}-java contains Java bindings for %{name}. %{name}-java contains Java bindings for %{name}.
@ -341,10 +341,10 @@ you will also need %{name}-java-devel.
%package java-devel %package java-devel
Summary: Java development package for %{name} Summary: Java development package for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{name}-java = %{epoch}:%{version}-%{release} Requires: %{name}-java = %{epoch}:%{version}-%{release}
%description java-devel %description java-devel
%{name}-java-devel contains the tools for developing Java software %{name}-java-devel contains the tools for developing Java software
@ -354,11 +354,11 @@ See also %{name}-javadoc.
%package javadoc %package javadoc
Summary: Java documentation for %{name} Summary: Java documentation for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{name}-java = %{epoch}:%{version}-%{release} Requires: %{name}-java = %{epoch}:%{version}-%{release}
Requires: jpackage-utils Requires: jpackage-utils
%description javadoc %description javadoc
%{name}-javadoc contains the Java documentation for %{name}. %{name}-javadoc contains the Java documentation for %{name}.
@ -376,6 +376,10 @@ mkdir -p daemon/m4
%if %{buildnet} %if %{buildnet}
%define extra --with-mirror=%{mirror} --with-updates=%{updates} %define extra --with-mirror=%{mirror} --with-updates=%{updates}
%else %else
# Build a local repository containing the packages used to
# install the current buildroot (assuming we are being built
# with mock or Koji). Then tell febootstrap to reference this
# local repository when building the appliance.
mkdir repo mkdir repo
find /var/cache/yum -type f -name '*.rpm' -print0 | xargs -0 cp -t repo find /var/cache/yum -type f -name '*.rpm' -print0 | xargs -0 cp -t repo
createrepo repo createrepo repo
@ -496,9 +500,6 @@ install -p -m0755 ruby/ext/guestfs/_guestfs.so $RPM_BUILD_ROOT%{ruby_sitearch}
rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.a rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.a
rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.la rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.la
# Generator shouldn't be executable when we distribute it.
chmod -x src/generator.ml
# Move installed documentation back to the source directory so # Move installed documentation back to the source directory so
# we can install it using a %%doc rule. # we can install it using a %%doc rule.
mv $RPM_BUILD_ROOT%{_docdir}/libguestfs installed-docs mv $RPM_BUILD_ROOT%{_docdir}/libguestfs installed-docs
@ -537,7 +538,6 @@ rm -rf $RPM_BUILD_ROOT
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ChangeLog HACKING TODO README ex html/guestfs.3.html html/pod.css %doc ChangeLog HACKING TODO README ex html/guestfs.3.html html/pod.css
%doc src/generator.ml
%doc installed-docs/* %doc installed-docs/*
%{_libdir}/libguestfs.so %{_libdir}/libguestfs.so
%{_libdir}/libhivex.so %{_libdir}/libhivex.so
@ -651,6 +651,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-4
- Don't include generator.ml in rpm. It's 400K and almost no one will need it.
- Add comments to spec file about how repo building works.
- Whitespace changes in the spec file.
* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-3 * Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-3
- Bump and rebuild. - Bump and rebuild.