Fix bogus Provides.

This commit is contained in:
Robin Norwood 2007-07-08 04:27:42 +00:00
parent 46742712f3
commit eef91c87fc
2 changed files with 27 additions and 7 deletions

View File

@ -1,3 +0,0 @@
#!/bin/sh
/usr/lib/rpm/find-requires $* | grep -v 'perl(XML::XPath)'

View File

@ -1,13 +1,12 @@
Name: perl-XML-Twig
Version: 3.29
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A perl module for processing huge XML documents in tree mode
Group: Development/Libraries
License: GPL or Artistic
URL: http://search.cpan.org/dist/XML-Twig/
Source0: http://www.cpan.org/authors/id/M/MI/MIROD/XML-Twig-%{version}.tar.gz
Source1: filter-requires.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -29,8 +28,6 @@ BuildRequires: perl(Unicode::Map8)
BuildRequires: perl(Unicode::String)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%define __perl_requires %{SOURCE1}
%description
This module provides a way to process XML documents. It is build on
top of XML::Parser. XML::Twig offers a tree interface to the
@ -44,10 +41,31 @@ twig_print_outside_roots options.
%prep
%setup -q -n XML-Twig-%{version}
# Filter unwanted Provides:
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
sed -e '/perl(XML::XPathEngine::NodeSet)/d'
EOF
%define __perl_provides %{_builddir}/XML-Twig-%{version}/%{name}-prov
chmod +x %{__perl_provides}
# Filter unwanted Requires:
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed -e '/perl(XML::XPath)/d'
EOF
%define __perl_requires %{_builddir}/XML-Twig-%{version}/%{name}-req
chmod +x %{__perl_requires}
%build
%{__perl} Makefile.PL -y INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
@ -72,6 +90,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Jul 08 2007 Robin Norwood <rnorwood@redhat.com> - 3.29-4
- Resolves: rhbz#247247
- Remove bogus Provides: perl(XML::XPathEngine::NodeSet), and move
Requires filter into spec file.
* Thu Jun 28 2007 Robin Norwood <rnorwood@redhat.com> - 3.29-3
- Add several buildrequires for tests and optional features