]> git.pld-linux.org Git - packages/perl-Params-Check.git/blob - perl-Params-Check.spec
741ad8f11cb5d142baea85c96bb45057a1edc0d6
[packages/perl-Params-Check.git] / perl-Params-Check.spec
1 #
2 # Conditional build:
3 %bcond_without  autodeps        # don't BR packages needed only for resolving deps
4 %bcond_without  tests           # do not perform "make test"
5 #
6 %include        /usr/lib/rpm/macros.perl
7 %define         pdir    Params
8 %define         pnam    Check
9 Summary:        Params::Check - a generic input parsing/checking mechanism
10 Summary(pl):    Params::Check - ogólny mechanizm analizy i sprawdzania wej¶cia
11 Name:           perl-Params-Check
12 Version:        0.25
13 Release:        0.1
14 # same as perl
15 License:        GPL v1+ or Artistic
16 Group:          Development/Languages/Perl
17 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
18 # Source0-md5:  1756a2b387544fea13b442f3be8a39dc
19 URL:            http://search.cpan.org/dist/Params-Check/
20 BuildRequires:  perl-devel >= 1:5.8.0
21 BuildRequires:  rpm-perlprov >= 4.1-13
22 %if %{with autodeps} && %{with tests}
23 BuildRequires:  perl-Locale-Maketext-Simple
24 %endif
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Perl module Params::Check is a generic input parsing/checking
30 mechanism. It allows you to validate input via a template. The only
31 requirement is that the arguments must be named. Params::Check can do
32 the following things for you:
33 - Convert all keys to lowercase
34 - Check if all required arguments have been provided
35 - Set arguments that have not been provided to the default
36 - Weed out arguments that are not supported and warn about them to the
37   user
38 - Validate the arguments given by the user based on strings, regexes,
39   lists or even subroutines
40 - Enforce type integrity if required
41
42 %description -l pl
43 Modu³ Perla Params::Check to ogólny mechanizm do analizy i sprawdzania
44 wej¶cia. Pozwala na sprawdzanie poprawno¶ci wej¶cia poprzez szablon.
45 Jedynym wymaganiem jest to, ¿eby argumenty by³y nazwane. Params::Check
46 mo¿e zrobiæ nastêpuj±ce rzeczy:
47 - przekszta³ciæ wszystkie klucze na ma³e litery
48 - sprawdziæ, czy wszystkie wymagane argumenty zosta³y podane
49 - ustawiæ nie podane argumenty na warto¶ci domy¶lne
50 - oddzieliæ argumenty nieobs³ugiwane i ostrzec o nich u¿ytkownika
51 - sprawdziæ poprawno¶æ podanych przez u¿ytkownika argumentów w oparciu
52   o ³añcuchy znaków, wyra¿enia regularne, listy lub nawet procedury
53 - wymusiæ spójno¶æ typów w razie potrzeby.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61
62 %{__make}
63
64 %{?with_tests:%{__make} test}
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %{__make} pure_install \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc README CHANGES
78 %dir %{perl_vendorlib}/Params
79 %{perl_vendorlib}/Params/Check.pm
80 %{_mandir}/man3/*
This page took 0.032404 seconds and 3 git commands to generate.