]> git.pld-linux.org Git - packages/cpanminus.git/blob - cpanminus.spec
drop cpanminus/fatscript.pm, same as bindir/cpanm
[packages/cpanminus.git] / cpanminus.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %include        /usr/lib/rpm/macros.perl
6 Summary:        Get, unpack, build and install CPAN modules
7 Name:           cpanminus
8 Version:        1.7001
9 Release:        1
10 License:        GPL+ or Artistic
11 Group:          Development/Libraries
12 Source0:        http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-%{name}-%{version}.tar.gz
13 # Source0-md5:  4655c5903e2885085262cf5f15ff5ae3
14 Source1:        http://pkgs.fedoraproject.org/cgit/perl-App-cpanminus.git/plain/fatunpack
15 # Source1-md5:  c6c93648af22e2e47f94d391868cef06
16 URL:            http://search.cpan.org/dist/App-cpanminus/
17 BuildRequires:  %{_bindir}/podselect
18 BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.30
19 BuildRequires:  perl(File::Path)
20 BuildRequires:  perl(File::Spec)
21 BuildRequires:  perl(Getopt::Long)
22 BuildRequires:  perl(strict)
23 BuildRequires:  perl(warnings)
24 BuildRequires:  rpm-perlprov >= 4.1-13
25 # Run-time:
26 # Nothing special. The tests are very poor. But we run perl -c at built-time
27 # to check for correct unpacking. So we need non-optional run-time
28 # dependencies at build-time too:
29 BuildRequires:  perl(Config)
30 BuildRequires:  perl(aliased)
31 BuildRequires:  perl(constant)
32 # CPAN::DistnameInfo not needed for compilation
33 # CPAN::Meta not needed for copmilation
34 # CPAN::Meta::Check not needed for compilation
35 # CPAN::Meta::Prereqs not needed for compilation
36 BuildRequires:  perl(CPAN::Meta::Requirements)
37 # CPAN::Meta::YAML not needed for compilation
38 BuildRequires:  perl(Cwd)
39 # Digest::SHA not needed for compilation
40 # Dumpvalue not needed for compilation
41 # ExtUtils::Manifest not needed for compilation
42 BuildRequires:  perl(File::Basename)
43 BuildRequires:  perl(File::Copy)
44 BuildRequires:  perl(File::Find)
45 # File::pushd not needed for compilation
46 BuildRequires:  perl(File::Temp)
47 # HTTP::Tiny not needed for compilation
48 # JSON::PP not needed for compilation
49 # local::lib not needed for compilation
50 # Module::CoreList not needed for compilation
51 # Module::CPANfile not needed for compilation
52 # Module::Metadata not needed for compilation
53 BuildRequires:  perl(Parse::CPAN::Meta)
54 # POSIX not needed for compilation
55 # Safe not needed for compilation
56 BuildRequires:  perl(String::ShellQuote)
57 BuildRequires:  perl(Symbol)
58 BuildRequires:  perl(version)
59 # version::vpp not needed for compilation
60 BuildRequires:  perl(warnings::register)
61 # YAML not needed for compilation
62 # Tests:
63 BuildRequires:  perl(Test::More)
64 # Current dependency generator cannot parse compressed code. Use PPI to find them, and list them manually:
65 # Archive::Tar is optional
66 # Archive::Zip is optional
67 # Compress::Zlib is optional
68 Requires:       perl(CPAN::DistnameInfo)
69 Requires:       perl(CPAN::Meta)
70 Requires:       perl(CPAN::Meta::Check)
71 Requires:       perl(CPAN::Meta::Prereqs)
72 Requires:       perl(CPAN::Meta::YAML)
73 Requires:       perl(Digest::SHA)
74 Requires:       perl(ExtUtils::Install) >= 1.46
75 Requires:       perl(ExtUtils::MakeMaker) >= 6.31
76 Requires:       perl(ExtUtils::Manifest)
77 # File::HomeDir is optional
78 Requires:       perl(File::pushd)
79 # HTTP getter by LWP::UserAgent or wget or curl or HTTP::Tiny
80 Requires:       perl(HTTP::Tiny)
81 Requires:       perl(local::lib)
82 # LWP::Protocol::https is optional
83 # LWP::UserAgent is optional
84 Requires:       perl(Module::Build)
85 Requires:       perl(Module::CPANfile)
86 Requires:       perl(Module::CoreList)
87 Requires:       perl(Module::Metadata)
88 # Module::Signature is optional
89 Requires:       perl(version::vpp)
90 # Win32 not used
91 Requires:       perl(YAML)
92 BuildArch:      noarch
93 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
95 %description
96 Why? It's dependency free, requires zero configuration, and stands
97 alone but it's maintainable and extensible with plug-ins and friendly
98 to shell scripting. When running, it requires only 10 MB of RAM.
99
100 %prep
101 %setup -q -n App-%{name}-%{version}
102 # Unbundle fat-packed modules
103 podselect lib/App/cpanminus.pm > lib/App/cpanminus.pod
104
105 for F in bin/cpanm lib/App/cpanminus/fatscript.pm; do
106         %{__perl} %{SOURCE1} --libdir lib --filter '^App/cpanminus' "$F" > "${F}.stripped"
107         perl -c -Ilib "${F}.stripped"
108         mv "${F}.stripped" "$F"
109 done
110
111 %build
112 %{__perl} Makefile.PL INSTALLDIRS=vendor
113 %{__make}
114 %{?with_tests:%{__make} test}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 %{__make} pure_install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/App/cpanminus/.packlist
122 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/App/cpanminus.pod
123 # same as bindir/cpanm
124 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/App/cpanminus/fatscript.pm
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %files
130 %defattr(644,root,root,755)
131 %doc Changes README
132 %attr(755,root,root) %{_bindir}/cpanm
133 %{perl_vendorlib}/App/cpanminus.pm
134 %{perl_vendorlib}/App/cpanminus
135 %{_mandir}/man1/cpanm.1*
136 %{_mandir}/man3/App::cpanminus*
This page took 0.029766 seconds and 3 git commands to generate.