Various package fixes

This commit is contained in:
Petr Šabata 2012-11-22 10:07:01 +01:00
parent d38b52db5a
commit 5e562b0189

View File

@ -1,19 +1,20 @@
Name: perl-libxml-perl
Version: 0.08
Release: 17%{?dist}
Release: 18%{?dist}
Summary: A collection of Perl modules for working with XML
Group: Development/Libraries
License: GPL+ or Artistic
License: (GPL+ or Artistic) and Public Domain
URL: http://search.cpan.org/dist/libxml-perl/
Source0: http://www.cpan.org/authors/id/K/KM/KMACLEOD/libxml-perl-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(Carp)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(IO::File)
BuildRequires: perl(XML::Parser)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Filter out unversioned provides
%global __provides_exclude %{?__provides_exclude?__provides_exclude|}^perl\\(Data::Grove\\)$
%description
libxml-perl is a collection of smaller Perl modules, scripts, and
@ -21,51 +22,35 @@ documents for working with XML in Perl. libxml-perl software works in
combination with XML::Parser, PerlSAX, XML::DOM, XML::Grove and
others.
%prep
%setup -q -n libxml-perl-%{version}
# Filter unwanted Provides:
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
sed -e '/perl(Data::Grove)$/d'
EOF
%define __perl_provides %{_builddir}/libxml-perl-%{version}/%{name}-prov
chmod +x %{__perl_provides}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
chmod -R u+w %{buildroot}/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc ChangeLog Changes README
%{perl_vendorlib}/Data/
%{perl_vendorlib}/XML/
%{_mandir}/man3/*.3*
%changelog
* Thu Nov 22 2012 Petr Šabata <contyk@redhat.com> - 0.08-18
- Correct buildtime dependencies
- Correct the licence tag
- Update the provides filter
- Drop command macros
- Modernize spec
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.08-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild