]> git.pld-linux.org Git - packages/perl-List-UtilsBy.git/blob - perl-List-UtilsBy.spec
4ba454c396d244457cca8161da857ab4b6eabb13
[packages/perl-List-UtilsBy.git] / perl-List-UtilsBy.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    List
6 %define         pnam    UtilsBy
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        List::UtilsBy - higher-order list utility functions
9 #Summary(pl.UTF-8):     
10 Name:           perl-List-UtilsBy
11 Version:        0.08
12 Release:        1
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-module/List/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  df0226ccd6f8ebf8b5965e408dca8662
18 # generic URL, check or change before uncommenting
19 #URL:           http://search.cpan.org/dist/List-UtilsBy/
20 BuildRequires:  perl-Module-Build
21 BuildRequires:  perl-devel >= 1:5.8.0
22 BuildRequires:  rpm-perlprov >= 4.1-13
23 %if %{with tests}
24 %endif
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 This module provides a number of list utility functions, all of which
30 take an initial code block to control their behaviour. They are
31 variations on similar core perl or List::Util functions of similar
32 names, but which use the block to control their behaviour. For
33 example, the core Perl function sort takes a list of values and
34 returns them, sorted into order by their string value. The sort_by
35 function sorts them according to the string value returned by the
36 extra function, when given each value.
37
38  my @names_sorted = sort @names;
39
40  my @people_sorted = sort_by { $_->name } @people;
41
42 # %description -l pl.UTF-8
43 # TODO
44
45 %prep
46 %setup -q -n %{pdir}-%{pnam}-%{version}
47
48 %build
49 %{__perl} Build.PL \
50         destdir=$RPM_BUILD_ROOT \
51         installdirs=vendor
52 ./Build
53
54 %{?with_tests:./Build test}
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58
59 ./Build install
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc Changes README
67 %{perl_vendorlib}/List/*.pm
68 %{_mandir}/man3/*
This page took 0.080003 seconds and 2 git commands to generate.