Name: perl-CPANPLUS
Version: 0.061
Release: 2%{?dist}
Summary: Command-line access to the CPAN interface
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
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, daemons, 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}
%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 -type d -depth -exec rmdir {} 2>/dev/null \;
chmod -R u+rwX,go+rX,go-w $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
* 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.