perl-App-cpanminus/perl-App-cpanminus.spec

102 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-App-cpanminus
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-App-cpanminus
Version: 1.5010
Release: 0
Summary: Get, unpack, build and install modules from CPAN
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Source: http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-%{version}.tar.gz
Url: http://search.cpan.org/dist/App-cpanminus
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: make
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(ExtUtils::Install) >= 1.46
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
BuildRequires: perl(Module::Build) >= 0.36
Requires: perl(ExtUtils::Install) >= 1.46
Requires: perl(ExtUtils::MakeMaker) >= 6.30
Requires: perl(Module::Build) >= 0.36
%description
cpanminus is a script to get, unpack, build and install modules from CPAN.
Why? It's dependency free, requires zero configuration, and stands alone.
When running, it requires only 10MB of RAM.
%package -n cpanm
Summary: Get, unpack, build and install modules from CPAN
Group: Development/Tools/Other
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description -n cpanm
cpanminus is a script to get, unpack, build and install modules from CPAN.
Why? It's dependency free, requires zero configuration, and stands alone.
When running, it requires only 10MB of RAM.
%prep
%setup -q -n "App-cpanminus-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
%__sed -i 's|6.31|6.30|g' Makefile.PL
%__grep -rlE 'ExtUtils::MakeMaker.*6\.' . | while read f; do
%__perl -p -i -e 's|^(.+ExtUtils::MakeMaker.*?)(6\.\d\d)(.*)$|${1}6.30$3|' "$f"
done
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}
%install
%perl_make_install
%perl_process_packlist
mkdir .rpmdoc
for f in Changes README; do
%__ln_s -f ../%{name}/$f .rpmdoc/$f
done
%check
%__make test
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc Changes README
%dir %{perl_vendorlib}/App
%{perl_vendorlib}/App/cpanminus.pm
%dir %{perl_vendorarch}/auto/App
%{perl_vendorarch}/auto/App/cpanminus
%doc %{perl_man3dir}/App::cpanminus.%{perl_man3ext}%{ext_man}
%files -n cpanm
%defattr(-,root,root)
%doc .rpmdoc/*
%{_bindir}/cpanm
%doc %{_mandir}/man1/cpanm.1%{ext_man}
%changelog