100 lines
4.2 KiB
RPMSpec
100 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package perl-HTML-Template-Pro
|
|
#
|
|
# 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 HTML-Template-Pro
|
|
Name: perl-HTML-Template-Pro
|
|
Version: 0.952.400
|
|
Release: 0
|
|
%define cpan_version 0.9524
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Perl/XS module to use HTML Templates from CGI scripts
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/V/VI/VIY/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(File::Path) >= 2
|
|
BuildRequires: perl(JSON) >= 2
|
|
Requires: perl(File::Path) >= 2
|
|
Requires: perl(JSON) >= 2
|
|
Provides: perl(HTML::Template::Pro) = %{version}
|
|
Provides: perl(HTML::Template::Pro::WrapAssociate)
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Original HTML::Template is written by Sam Tregar, sam@tregar.com with
|
|
contributions of many people mentioned there. Their efforts caused
|
|
HTML::Template to be mature html tempate engine which separate perl code
|
|
and html design. Yet powerful, HTML::Template is slow, especially if
|
|
mod_perl isn't available or in case of disk usage and memory limitations.
|
|
|
|
HTML::Template::Pro is a fast lightweight C/Perl+XS reimplementation of
|
|
HTML::Template (as of 2.9) and HTML::Template::Expr (as of 0.0.7). It is
|
|
not intended to be a complete replacement, but to be a fast implementation
|
|
of HTML::Template if you don't need querying, the extended facility of
|
|
HTML::Template. Designed for heavy upload, resource limitations, abcence of
|
|
mod_perl.
|
|
|
|
HTML::Template::Pro has complete support of filters and
|
|
HTML::Template::Expr's tag EXPR="<expression>", including user-defined
|
|
functions and construction <TMPL_INCLUDE EXPR="...">.
|
|
|
|
HTML::Template work cycle uses 2 steps. First, it loads and parse template.
|
|
Then it accepts param() calls until you call output(). output() is its
|
|
second phase where it produces a page from the parsed tree of template,
|
|
obtained in the 1st step.
|
|
|
|
HTML::Template::Pro loads, parse and outputs template on fly, when you call
|
|
$tmpl->output(), in one pass. The corresponding code is written in C and
|
|
glued to Perl using Perl+XS. As a result, comparing to HTML::Template in
|
|
ordinary calls, it runs 10-25 times faster. Comparing to HTML::Template
|
|
with all caching enabled under mod_perl, it still 1-3 times faster. At that
|
|
HTML::Template caching requires considerable amount of memory (per process,
|
|
shareable, or on disk) to be permanently filled with parsed trees, whereas
|
|
HTML::Template::Pro don't consumes memory for caches and use mmap() for
|
|
reading templates on disk.
|
|
|
|
Introduction to HTML::Template and syntax of template files is described in
|
|
HTML::Template::SYNTAX. Perl interface of HTML::Template and
|
|
HTML::Template::Pro is described in HTML::Template::PerlInterface.
|
|
|
|
%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 OPTIMIZE="%{optflags}"
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc benchmark.pl.t builtin_findfile.inc calc.inc callback_stubs.inc Changes cmp_expr.t exprpstr.inc exprtool.inc expr.y FAQ LGPL loadfile.inc loopvar.inc pparam2proparam proscope.inc prostate.inc pstrutils.inc README README.ru README.win32 tags.inc tagstack.inc test_crlf.out TODO
|
|
%license ARTISTIC
|
|
|
|
%changelog
|