Spec clean-up

- Break build dependency loop by only using perl(Business::ISBN) if we're not
  bootstrapping
- BR: perl(Carp) and perl(Exporter)
- Make %files list more explicit
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Use %{_fixperms} macro rather than our own chmod incantation
- Don't use macros for commands
This commit is contained in:
Paul Howarth 2012-01-20 14:22:57 +00:00
parent b3d3884f5d
commit 5d64e5c56a
2 changed files with 36 additions and 23 deletions

6
.gitignore vendored
View File

@ -1,5 +1 @@
URI-1.54.tar.gz
/URI-1.55.tar.gz
/URI-1.56.tar.gz
/URI-1.58.tar.gz
/URI-1.59.tar.gz
/URI-[0-9.]*.tar.gz

View File

@ -1,54 +1,71 @@
Name: perl-URI
Version: 1.59
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A Perl module implementing URI parsing and manipulation
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/URI/
Source0: http://www.cpan.org/authors/id/G/GA/GAAS/URI-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl(MIME::Base64)
BuildRequires: perl(Carp)
BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(MIME::Base64)
BuildRequires: perl(Test::More)
# Business::ISBN -> Test::Pod -> Pod::Simple -> HTML::Entities (HTML::Parser) -> URI
%if 0%{!?perl_bootstrap:1}
BuildRequires: perl(Business::ISBN)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
This module implements the URI class. Objects of this class represent
"Uniform Resource Identifier references" as specified in RFC 2396 (and
updated by RFC 2732).
%prep
%setup -q -n URI-%{version}
chmod 644 uri-test
%build
%{__perl} Makefile.PL INSTALLDIRS=perl
perl Makefile.PL INSTALLDIRS=perl
make %{?_smp_mflags}
%install
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 {} ';'
find %{buildroot} -type d -depth -exec rmdir {} ';' 2>/dev/null
%{_fixperms} %{buildroot}
%check
make test
%files
%doc Changes README uri-test
%{perl_privlib}/URI*
%{_mandir}/man3/*.3*
%{perl_privlib}/URI.pm
%{perl_privlib}/URI/
%{_mandir}/man3/URI.3pm*
%{_mandir}/man3/URI::Escape.3pm*
%{_mandir}/man3/URI::Heuristic.3pm*
%{_mandir}/man3/URI::QueryParam.3pm*
%{_mandir}/man3/URI::Split.3pm*
%{_mandir}/man3/URI::URL.3pm*
%{_mandir}/man3/URI::WithBase.3pm*
%{_mandir}/man3/URI::_punycode.3pm*
%{_mandir}/man3/URI::data.3pm*
%{_mandir}/man3/URI::file.3pm*
%{_mandir}/man3/URI::ldap.3pm*
%changelog
* Fri Jan 20 2012 Paul Howarth <paul@city-fan.org> - 1.59-3
- Break build dependency loop by only using perl(Business::ISBN) if we're not
bootstrapping
- BR: perl(Carp) and perl(Exporter)
- Make %%files list more explicit
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Use %%{_fixperms} macro rather than our own chmod incantation
- Don't use macros for commands
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.59-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild