diff --git a/perl-CPAN-Inject.spec b/perl-CPAN-Inject.spec index 8e7a1ac..efdb962 100644 --- a/perl-CPAN-Inject.spec +++ b/perl-CPAN-Inject.spec @@ -10,7 +10,15 @@ Patch0: CPAN-Inject-1.14-Restore-working-directory-after-loading-CPAN-co # Expect en error if DNS does not work, bug #1138562, CPAN RT#98774 Patch1: CPAN-Inject-1.14-Expect-unknown-exception-while-loading-CPAN-configur.patch BuildArch: noarch +# Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: sed +BuildRequires: make BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(inc::Module::Install) >= 1.00 +# Runtime BuildRequires: perl(CPAN) >= 1.36 BuildRequires: perl(CPAN::Checksums) >= 1.05 BuildRequires: perl(Cwd) @@ -18,12 +26,14 @@ BuildRequires: perl(File::Basename) >= 2.6 BuildRequires: perl(File::chmod) >= 0.30 BuildRequires: perl(File::Copy) >= 2.02 BuildRequires: perl(File::Path) >= 1.00 -BuildRequires: perl(File::Remove) >= 0.34 BuildRequires: perl(File::Spec) >= 0.80 BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(File::stat) >= 1.00 -BuildRequires: perl(inc::Module::Install) BuildRequires: perl(Params::Util) >= 0.21 +BuildRequires: perl(strict) +BuildRequires: perl(vars) +# Tests +BuildRequires: perl(File::Remove) >= 0.34 BuildRequires: perl(Test::More) >= 0.42 BuildRequires: perl(Test::Script) >= 1.02 Requires: perl(CPAN) >= 1.36 @@ -39,6 +49,11 @@ Requires: perl(File::chmod) >= 0.30 Requires: perl(Params::Util) >= 0.21 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(CPAN::Checksums\\)\s*$ +%global __requires_exclude %__requires_exclude|^perl\\(File::(Basename|chmod|Copy|Path|Spec|stat|chmod)\\)\s*$ +%global __requires_exclude %__requires_exclude|^perl\\(Params::Util\\)\s*$ + %description Following the release of CPAN::Mini, the CPAN::Mini::Inject module was created to add additional distributions into a minicpan mirror. @@ -54,12 +69,11 @@ sed -i -e '/^inc\// d' MANIFEST find -type f -exec chmod -x {} + %build -perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} %install -make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +%{make_install} %{_fixperms} $RPM_BUILD_ROOT/* %check