68 lines
2.2 KiB
RPMSpec
68 lines
2.2 KiB
RPMSpec
![]() |
# vim: set sw=4 ts=4 et nu:
|
||
|
|
||
|
Name: perl-Data-Validate-URI
|
||
|
Version: 0.05
|
||
|
Release: 0
|
||
|
Summary: URI Validation Routines
|
||
|
Source: http://search.cpan.org/CPAN/authors/id/S/SO/SONNEN/Data-Validate-URI-%{version}.tar.gz
|
||
|
URL: http://search.cpan.org/dist/Data-Validate-URI
|
||
|
Group: Development/Libraries/Perl
|
||
|
License: GNU General Public License version 2 or later or Artistic (GPLv2+ or Artistic)
|
||
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
||
|
%{perl_requires}
|
||
|
BuildRequires: perl-macros
|
||
|
BuildRequires: make
|
||
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||
|
BuildRequires: perl(Data::Validate::Domain)
|
||
|
BuildRequires: perl(Data::Validate::IP)
|
||
|
Requires: perl(Data::Validate::Domain)
|
||
|
Requires: perl(Data::Validate::IP)
|
||
|
%if 0%{?suse_version} >= 1120
|
||
|
BuildArch: noarch
|
||
|
%endif
|
||
|
|
||
|
%description
|
||
|
This module collects common URI validation routines to make input
|
||
|
validation, and untainting easier and more readable.
|
||
|
All functions return an untainted value if the test passes, and undef if
|
||
|
it fails. This means that you should always check for a defined status
|
||
|
explicitly. Don't assume the return will be true.
|
||
|
The value to test is always the first (and often only) argument.
|
||
|
There are a number of other URI validation modules out there as well (see
|
||
|
below.) This one focuses on being fast, lightweight, and relatively
|
||
|
'real-world'. i.e. it's good if you want to check user input, and don't
|
||
|
need to parse out the URI/URL into chunks.
|
||
|
Right now the module focuses on HTTP URIs, since they're arguably the most
|
||
|
common. If you have a specialized scheme you'd like to have supported, let
|
||
|
me know.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n "Data-Validate-URI-%{version}"
|
||
|
%__sed -i '/^auto_install/d' Makefile.PL
|
||
|
|
||
|
%build
|
||
|
%__perl Makefile.PL PREFIX="%{_prefix}"
|
||
|
%__make %{?_smp_flags}
|
||
|
|
||
|
%install
|
||
|
%perl_make_install
|
||
|
%perl_process_packlist
|
||
|
|
||
|
%check
|
||
|
%__make test
|
||
|
|
||
|
%clean
|
||
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%doc Changes README
|
||
|
%dir %{perl_vendorlib}/Data
|
||
|
%dir %{perl_vendorlib}/Data/Validate
|
||
|
%{perl_vendorlib}/Data/Validate/URI.pm
|
||
|
%dir %{perl_vendorlib}/auto/Data
|
||
|
%dir %{perl_vendorlib}/auto/Data/Validate
|
||
|
%{perl_vendorlib}/auto/Data/Validate/URI
|
||
|
%doc %{perl_man3dir}/Data::Validate::URI.%{perl_man3ext}%{ext_man}
|
||
|
|