]>
Commit | Line | Data |
---|---|---|
294891f4 ER |
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 | |
5ebc102f ER |
8 | Version: 1.7034 |
9 | Release: 1 | |
294891f4 ER |
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 | |
5ebc102f | 13 | # Source0-md5: d739e44f7dabca32231ffaf36ebfe647 |
294891f4 | 14 | Source1: http://pkgs.fedoraproject.org/cgit/perl-App-cpanminus.git/plain/fatunpack |
5ebc102f | 15 | # Source1-md5: c69ce04e198446d28e2aaa8ba3291542 |
294891f4 | 16 | URL: http://search.cpan.org/dist/App-cpanminus/ |
294891f4 | 17 | BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 |
21695127 | 18 | BuildRequires: perl-String-ShellQuote |
21695127 ER |
19 | BuildRequires: perl-base |
20 | BuildRequires: perl-devel | |
21 | BuildRequires: perl-modules | |
22 | BuildRequires: perl-tools-pod | |
23 | BuildRequires: perl-version | |
294891f4 | 24 | BuildRequires: rpm-perlprov >= 4.1-13 |
294891f4 | 25 | Requires: perl(ExtUtils::Install) >= 1.46 |
5ebc102f | 26 | Requires: perl(ExtUtils::MakeMaker) >= 6.58 |
21695127 ER |
27 | Requires: perl-CPAN-DistnameInfo |
28 | Requires: perl-CPAN-Meta-Check | |
29 | Requires: perl-File-pushd | |
30 | Requires: perl-Module-CPANfile | |
31 | Requires: perl-Parse-PMFile | |
32 | Requires: perl-YAML | |
33 | Requires: perl-local-lib | |
294891f4 ER |
34 | BuildArch: noarch |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | Why? It's dependency free, requires zero configuration, and stands | |
39 | alone but it's maintainable and extensible with plug-ins and friendly | |
40 | to shell scripting. When running, it requires only 10 MB of RAM. | |
41 | ||
42 | %prep | |
43 | %setup -q -n App-%{name}-%{version} | |
b3956ea3 ER |
44 | |
45 | %build | |
294891f4 ER |
46 | # Unbundle fat-packed modules |
47 | podselect lib/App/cpanminus.pm > lib/App/cpanminus.pod | |
48 | ||
49 | for F in bin/cpanm lib/App/cpanminus/fatscript.pm; do | |
50 | %{__perl} %{SOURCE1} --libdir lib --filter '^App/cpanminus' "$F" > "${F}.stripped" | |
51 | perl -c -Ilib "${F}.stripped" | |
52 | mv "${F}.stripped" "$F" | |
53 | done | |
54 | ||
b3a24f7f ER |
55 | # strip remains of fatpack |
56 | %{__sed} -i -e '/DO NOT EDIT/,/END OF FATPACK CODE/d' bin/cpanm | |
57 | ||
294891f4 | 58 | %{__perl} Makefile.PL INSTALLDIRS=vendor |
540fa720 ER |
59 | |
60 | # strip pod, already in manual | |
61 | %{__sed} -i -e '/__END__/,$d' bin/cpanm | |
62 | ||
294891f4 ER |
63 | %{__make} |
64 | %{?with_tests:%{__make} test} | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | %{__make} pure_install \ | |
69 | DESTDIR=$RPM_BUILD_ROOT | |
70 | ||
71 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/App/cpanminus/.packlist | |
72 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/App/cpanminus.pod | |
23870d16 ER |
73 | # same as bindir/cpanm |
74 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/App/cpanminus/fatscript.pm | |
294891f4 ER |
75 | |
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
5ebc102f | 81 | %doc Changes README LICENSE |
294891f4 ER |
82 | %attr(755,root,root) %{_bindir}/cpanm |
83 | %{perl_vendorlib}/App/cpanminus.pm | |
84 | %{perl_vendorlib}/App/cpanminus | |
85 | %{_mandir}/man1/cpanm.1* | |
86 | %{_mandir}/man3/App::cpanminus* |