Files
perl-Data-FormValidator/perl-Data-FormValidator.spec
2025-08-12 18:13:03 +02:00

89 lines
3.2 KiB
RPMSpec

#
# spec file for package perl-Data-FormValidator
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define cpan_name Data-FormValidator
Name: perl-Data-FormValidator
Version: 4.880.0
Release: 0
# 4.88 -> normalize -> 4.880.0
%define cpan_version 4.88
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Validates user input (usually from an HTML form) based on input profile
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/D/DF/DFARRELL/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Date::Calc) >= 5
BuildRequires: perl(Email::Valid)
BuildRequires: perl(File::MMagic) >= 1.17
BuildRequires: perl(Image::Size)
BuildRequires: perl(MIME::Types) >= 1.005
BuildRequires: perl(Regexp::Common) >= 0.03
Requires: perl(Date::Calc) >= 5
Requires: perl(Email::Valid)
Requires: perl(File::MMagic) >= 1.17
Requires: perl(Image::Size)
Requires: perl(MIME::Types) >= 1.005
Requires: perl(Regexp::Common) >= 0.03
Provides: perl(Data::FormValidator) = %{version}
Provides: perl(Data::FormValidator::Constraints) = %{version}
Provides: perl(Data::FormValidator::Constraints::Dates) = %{version}
Provides: perl(Data::FormValidator::Constraints::RegexpCommon)
Provides: perl(Data::FormValidator::Constraints::Upload) = %{version}
Provides: perl(Data::FormValidator::ConstraintsFactory) = %{version}
Provides: perl(Data::FormValidator::Filters) = %{version}
Provides: perl(Data::FormValidator::Results) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Data::FormValidator's main aim is to make input validation expressible in a
simple format.
Data::FormValidator lets you define profiles which declare the required and
optional fields and any constraints they might have.
The results are provided as an object, which makes it easy to handle
missing and invalid results, return error messages about which constraints
failed, or process the resulting valid data.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes RELEASE_NOTES
%changelog