]>
Commit | Line | Data |
---|---|---|
61f47baa ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
61f47baa ER |
5 | Summary: Extract distribution name and version from a distribution filename |
6 | Name: perl-CPAN-DistnameInfo | |
7 | Version: 0.12 | |
8 | Release: 1 | |
9 | License: GPL+ or Artistic | |
10 | Group: Development/Libraries | |
11 | Source0: http://www.cpan.org/authors/id/G/GB/GBARR/CPAN-DistnameInfo-%{version}.tar.gz | |
12 | # Source0-md5: 06bc803c0e4fb7735ddc7282163f1cc3 | |
13 | URL: http://search.cpan.org/dist/CPAN-DistnameInfo/ | |
14 | BuildRequires: perl(ExtUtils::MakeMaker) | |
c24eefed | 15 | BuildRequires: perl-Encode |
61f47baa ER |
16 | BuildRequires: rpm-perlprov >= 4.1-13 |
17 | %if %{with tests} | |
18 | BuildRequires: perl(Data::Dumper) | |
19 | BuildRequires: perl(Test::More) | |
20 | %endif | |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Many online services that are centered around CPAN attempt to | |
26 | associate multiple uploads by extracting a distribution name from the | |
27 | filename of the upload. For most distributions this is easy as they | |
28 | have used ExtUtils::MakeMaker or Module::Build to create the | |
29 | distribution, which results in a uniform name. But sadly not all | |
30 | uploads are created in this way. | |
31 | ||
32 | CPAN::DistnameInfo uses heuristics that have been learnt by | |
33 | <http://search.cpan.org/> to extract the distribution name and version | |
34 | from filenames and also report if the version is to be treated as a | |
35 | developer release. | |
36 | ||
37 | %prep | |
38 | %setup -q -n CPAN-DistnameInfo-%{version} | |
39 | ||
40 | %build | |
41 | %{__perl} Makefile.PL INSTALLDIRS=vendor | |
42 | %{__make} | |
43 | %{?with_tests:%{__make} test} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | %{__make} pure_install \ | |
48 | DESTDIR=$RPM_BUILD_ROOT | |
49 | ||
50 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/CPAN/DistnameInfo/.packlist | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %doc Changes README | |
58 | %{perl_vendorlib}/CPAN/DistnameInfo.pm | |
59 | %{_mandir}/man3/CPAN::DistnameInfo.3pm* |