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