Blob Blame History Raw
Name:           perl-CPANPLUS
Version:        0.076
Release:        2%{?dist}
Summary:        API & CLI access to the CPAN mirrors
License:        GPL or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/CPANPLUS/
Source0:        http://www.cpan.org/authors/id/K/KA/KANE/CPANPLUS-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  perl(Archive::Extract) >= 0.07
BuildRequires:  perl(File::Fetch) >= 0.07
BuildRequires:  perl(IPC::Cmd) >= 0.24
BuildRequires:  perl(IPC::Run) >= 0.79
BuildRequires:  perl(Locale::Maketext::Simple)
BuildRequires:  perl(Log::Message)
BuildRequires:  perl(Module::Load) >= 0.10
BuildRequires:  perl(Module::Load::Conditional) >= 0.07
BuildRequires:  perl(Module::Loaded)
BuildRequires:  perl(Module::Pluggable) >= 2.4
BuildRequires:  perl(Object::Accessor) >= 0.03
BuildRequires:  perl(Params::Check) >= 0.22
BuildRequires:  perl(Term::UI) >= 0.05
%{?_with_check:BuildRequires:  perl(Package::Constants)}
%{?_with_check:BuildRequires:  perl(Module::CoreList)}
Requires:       perl(IPC::Run) >= 0.79
Requires:       perl(Module::Pluggable) >= 2.4
Requires:       perl(Module::CoreList)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Source98:       CPANPLUS-filter-requires.sh
%global real_perl_requires %{__perl_requires}
%define __perl_requires %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)-filter-requires

%description
The CPANPLUS library is an API to the CPAN mirrors and a collection of
interactive shells, commandline programs, etc, that use this API.

%prep
%setup -q -n CPANPLUS-%{version}

sed -e 's,@@PERL_REQ@@,%{real_perl_requires},' %{SOURCE98} > %{__perl_requires}
chmod +x %{__perl_requires}

perl -pi -e 'print "#!/usr/bin/perl\n\n" if ($. == 1)' bin/cpanp-run-perl

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor AUTOINSTALL=1
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 f -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
%{?_with_check:make test}

%clean
rm -rf $RPM_BUILD_ROOT %{__perl_requires}

%files
%defattr(-,root,root,-)
%doc ChangeLog README
%{_bindir}/*
%{perl_vendorlib}/*
%{_mandir}/man1/*
%{_mandir}/man3/*

%changelog
* Tue Jan 30 2007 Steven Pritchard <steve@kspei.com> 0.076-2
- Add missing explicit dependencies on IPC::Run, Module::CoreList, and
  Module::Pluggable (#225357).
- Add missing BR: Package::Constants, Module::CoreList.

* Mon Oct 16 2006 Steven Pritchard <steve@kspei.com> 0.076-1
- Update to 0.076.
- Fix find option order.
- Use fixperms macro instead of our own chmod incantation.
- Add #! line to cpanp-run-perl.

* Wed Sep 13 2006 Steven Pritchard <steve@kspei.com> 0.074-1
- Update to 0.074.
- Minor cleanup.

* Fri Jun 30 2006 Steven Pritchard <steve@kspei.com> 0.072-1
- Update to 0.072.

* Fri Jun 02 2006 Steven Pritchard <steve@kspei.com> 0.061-3
- Rebuild.

* Sat May 06 2006 Steven Pritchard <steve@kspei.com> 0.061-2
- Delete zero-length files from $RPM_BUILD_ROOT.

* Thu Mar 23 2006 Steven Pritchard <steve@kspei.com> 0.061-1
- Specfile autogenerated by cpanspec 1.62.
- Removed explicit BR: perl.
- Add a ton of BuildRequires.
- Disabled "make test" by default (wants to install to root fs).
- Add bindir and man1 files.
- Add AUTOINSTALL=1 to Makefile.PL run to avoid configuring at build time.