File perl-CGI-FormBuilder.spec of Package perl-CGI-FormBuilder
#
# spec file for package perl-CGI-FormBuilder (Version 3.0501)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-CGI-FormBuilder
%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
Summary: Easily generate and process stateful forms
Version: 3.0501
Release: 4
License: GPL, Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/CGI-FormBuilder/
#Url: http://www.formbuilder.org/
Source: %{cpan_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(CGI)
BuildRequires: perl(CGI::FastTemplate) >= 1.09
BuildRequires: perl(HTML::Template) >= 2.06
BuildRequires: perl(Template) >= 2.08
BuildRequires: perl(Text::Template) >= 1.43
#
Requires: perl(CGI)
%if 0%{?suse_version} >= 1100
BuildRequires: fdupes
Recommends: perl(CGI::FastTemplate) >= 1.09
Recommends: perl(HTML::Template) >= 2.06
Recommends: perl(Template) >= 2.08
Recommends: perl(Text::Template) >= 1.43
%else
Requires: perl(CGI::FastTemplate) >= 1.09
Requires: perl(HTML::Template) >= 2.06
Requires: perl(Template) >= 2.08
Requires: perl(Text::Template) >= 1.43
%endif
#
Provides: %{cpan_name}
%description
The goal of CGI::FormBuilder (FormBuilder) is to provide an easy
way for you to generate and process entire CGI form-based
applications. Its main features are:
Field Abstraction
Viewing fields as entities (instead of just params), where the
HTML representation, CGI values, validation, and so on are
properties of each field.
DWIMmery
Lots of built-in "intelligence" (such as automatic field typing),
giving you about a 4:1 ratio of the code it generates versus what
you have to write.
Built-in Validation
Full-blown regex validation for fields, even including
JavaScript code generation.
Template Support
Pluggable support for external template engines,
such as HTML::Template, Text::Template, Template Toolkit,
and CGI::FastTemplate.
Plus, the native HTML generated is valid XHTML 1.0 Transitional.
Author: Nathan Wiger <nate@wiger.org>
%prep
%setup -n %{cpan_name}-%{version}
# o_O
%{__rm} lib/CGI/FormBuilder.pm.orig
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
%{__make}
%check
%{__make} test
%install
%perl_make_install
## rpmlint
# files-duplicate
%if 0%{?suse_version} >= 1100
%fdupes $RPM_BUILD_ROOT%perl_vendorlib
%endif
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-, root, root)
%doc Changes README
%changelog