perl-Params-Util/perl-Params-Util.spec

89 lines
3.5 KiB
RPMSpec

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: perl-Params-Util
Version: 1.07
Release: 2mamba
Summary: Params::Util - Simple, compact and correct param-checking functions
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: http://www.cpan.org
Source: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Params-Util-%{version}.tar.gz
License: GPL, Artistic
Requires: perl >= %perl_major_ver
BuildRequires: perl-devel >= %perl_major_ver
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Params::Util provides a basic set of importable functions that makes checking parameters a hell of a lot easier
While they can be (and are) used in other contexts, the main point behind this module is that the functions both Do What You Mean, and Do The Right Thing, so they are most useful when you are getting params passed into your code from someone and/or somewhere else and you can't really trust the quality.
Thus, Params::Util is of most use at the edges of your API, where params and data are coming in from outside your code.
The functions provided by Params::Util check in the most strictly correct manner known, are documented as thoroughly as possible so their exact behaviour is clear, and heavily tested so make sure they are not fooled by weird data and Really Bad Things.
To use, simply load the module providing the functions you want to use as arguments (as shown in the SYNOPSIS).
To aid in maintainability, Params::Util will never export by default.
You must explicitly name the functions you want to export, or use the :ALL param to just have it export everything (although this is not recommended if you have any _FOO functions yourself with which future additions to Params::Util may clash)
%prep
%setup -q -n Params-Util-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
%make
%make test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall_perl
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \
sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \
sort -u > .packlist && rm $packlist
strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'`
for dir in `find %{buildroot} -type d | grep $strid`; do
echo "%dir ${dir#%buildroot}" >> .packlist
done
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -f .packlist
%files -f .packlist
%defattr(-,root,root)
%changelog
* Mon Nov 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.07-2mamba
- perl 5.16 mass rebuild
* Tue Apr 24 2012 Automatic Build System <autodist@mambasoft.it> 1.07-1mamba
- automatic version update by autodist
* Thu Apr 21 2011 Automatic Build System <autodist@mambasoft.it> 1.04-1mamba
- automatic update by autodist
* Sun Dec 05 2010 Automatic Build System <autodist@mambasoft.it> 1.03-1mamba
- automatic update by autodist
* Wed Sep 22 2010 Automatic Build System <autodist@mambasoft.it> 1.02_01-1mamba
- automatic update by autodist
* Mon Apr 19 2010 Automatic Build System <autodist@mambasoft.it> 1.01-1mamba
- automatic update by autodist
* Sun Jun 07 2009 Automatic Build System <autodist@mambasoft.it> 1.00-1mamba
- automatic update by autodist
* Wed Nov 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-2mamba
- automatic rebuild by autodist
* Mon Oct 20 2008 gil <puntogil@libero.it> 0.33-1mamba
- package created by autospec