164 lines
7.0 KiB
RPMSpec
164 lines
7.0 KiB
RPMSpec
#
|
|
# spec file for package perl-HTML-Mason
|
|
#
|
|
# 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-Mason
|
|
Name: perl-HTML-Mason
|
|
Version: 1.600.0
|
|
Release: 0
|
|
# 1.60 -> normalize -> 1.600.0
|
|
%define cpan_version 1.60
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: High-performance, dynamic web site authoring system
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(CGI) >= 2.46
|
|
BuildRequires: perl(Cache::Cache) >= 1.00
|
|
BuildRequires: perl(Class::Container) >= 0.07
|
|
BuildRequires: perl(Exception::Class) >= 1.15
|
|
BuildRequires: perl(HTML::Entities)
|
|
BuildRequires: perl(Log::Any) >= 0.08
|
|
BuildRequires: perl(Params::Validate) >= 0.70
|
|
BuildRequires: perl(Test::More) >= 0.96
|
|
Requires: perl(CGI) >= 2.46
|
|
Requires: perl(Cache::Cache) >= 1.00
|
|
Requires: perl(Class::Container) >= 0.07
|
|
Requires: perl(Exception::Class) >= 1.15
|
|
Requires: perl(HTML::Entities)
|
|
Requires: perl(Log::Any) >= 0.08
|
|
Requires: perl(Params::Validate) >= 0.70
|
|
Provides: perl(HTML::Mason) = %{version}
|
|
Provides: perl(HTML::Mason::Apache::Request) = %{version}
|
|
Provides: perl(HTML::Mason::ApacheHandler) = 1.690.0
|
|
Provides: perl(HTML::Mason::CGIHandler) = %{version}
|
|
Provides: perl(HTML::Mason::Cache::BaseCache) = %{version}
|
|
Provides: perl(HTML::Mason::Compiler) = %{version}
|
|
Provides: perl(HTML::Mason::Compiler::ToObject) = %{version}
|
|
Provides: perl(HTML::Mason::Component) = %{version}
|
|
Provides: perl(HTML::Mason::Component::FileBased) = %{version}
|
|
Provides: perl(HTML::Mason::Component::Subcomponent) = %{version}
|
|
Provides: perl(HTML::Mason::ComponentSource) = %{version}
|
|
Provides: perl(HTML::Mason::Escapes) = %{version}
|
|
Provides: perl(HTML::Mason::Exception) = %{version}
|
|
Provides: perl(HTML::Mason::Exception::Compilation) = %{version}
|
|
Provides: perl(HTML::Mason::Exception::Syntax) = %{version}
|
|
Provides: perl(HTML::Mason::Exceptions) = %{version}
|
|
Provides: perl(HTML::Mason::FakeApache) = %{version}
|
|
Provides: perl(HTML::Mason::FakeTable) = %{version}
|
|
Provides: perl(HTML::Mason::FakeTableHash) = %{version}
|
|
Provides: perl(HTML::Mason::Handler) = %{version}
|
|
Provides: perl(HTML::Mason::Interp) = %{version}
|
|
Provides: perl(HTML::Mason::Lexer) = %{version}
|
|
Provides: perl(HTML::Mason::MethodMaker) = %{version}
|
|
Provides: perl(HTML::Mason::Plugin) = %{version}
|
|
Provides: perl(HTML::Mason::Plugin::Context) = %{version}
|
|
Provides: perl(HTML::Mason::Plugin::Context::EndComponent) = %{version}
|
|
Provides: perl(HTML::Mason::Plugin::Context::EndRequest) = %{version}
|
|
Provides: perl(HTML::Mason::Plugin::Context::StartComponent) = %{version}
|
|
Provides: perl(HTML::Mason::Plugin::Context::StartRequest) = %{version}
|
|
Provides: perl(HTML::Mason::Request) = %{version}
|
|
Provides: perl(HTML::Mason::Request::ApacheHandler)
|
|
Provides: perl(HTML::Mason::Request::CGI) = %{version}
|
|
Provides: perl(HTML::Mason::Resolver) = %{version}
|
|
Provides: perl(HTML::Mason::Resolver::File) = %{version}
|
|
Provides: perl(HTML::Mason::Resolver::Null) = %{version}
|
|
Provides: perl(HTML::Mason::Tests) = %{version}
|
|
Provides: perl(HTML::Mason::Tools) = %{version}
|
|
Provides: perl(HTML::Mason::Utils) = %{version}
|
|
Provides: perl(Tie::Handle::Mason) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Mason is a tool for building, serving and managing large web sites. Its
|
|
features make it an ideal backend for high load sites serving dynamic
|
|
content, such as online newspapers or database driven e-commerce sites.
|
|
|
|
Actually, Mason can be used to generate any sort of text, whether for a web
|
|
site or not. But it was originally built for web sites and since that's why
|
|
most people are interested in it, that is the focus of this documentation.
|
|
|
|
Mason's various pieces revolve around the notion of "components''. A
|
|
component is a mix of HTML, Perl, and special Mason commands, one component
|
|
per file. So-called "top-level" components represent entire web-pages,
|
|
while smaller components typically return HTML snippets for embedding in
|
|
top-level components. This object-like architecture greatly simplifies site
|
|
maintenance: change a shared component, and you instantly changed all
|
|
dependent pages that refer to it across a site (or across many virtual
|
|
sites).
|
|
|
|
Mason's component syntax lets designers separate a web page into
|
|
programmatic and design elements. This means the esoteric Perl bits can be
|
|
hidden near the bottom of a component, preloading simple variables for use
|
|
above in the HTML. In our own experience, this frees content managers
|
|
(i.e., non-programmers) to work on the layout without getting mired in
|
|
programming details. Techies, however, still enjoy the full power of Perl.
|
|
|
|
Mason works by intercepting innocent-looking requests (say,
|
|
http://www.yoursite.com/index.html) and mapping them to requests for Mason
|
|
components. Mason then compiles the component, runs it, and feeds the
|
|
output back to the client.
|
|
|
|
Consider this simple Mason component:
|
|
|
|
% my $noun = 'World';
|
|
Hello <% $noun %>!
|
|
How are ya?
|
|
|
|
The output of this component is:
|
|
|
|
Hello World!
|
|
How are ya?
|
|
|
|
In this component you see a mix of standard HTML and Mason elements. The
|
|
bare '%' prefixing the first line tells Mason that this is a line of Perl
|
|
code. One line below, the embedded <% ... %> tag gets replaced with the
|
|
return value of its contents, evaluated as a Perl expression.
|
|
|
|
Beyond this trivial example, components can also embed serious chunks of
|
|
Perl code (say, to pull records from a database). They can also call other
|
|
components, cache results for later reuse, and perform all the tricks you
|
|
expect from a regular Perl program.
|
|
|
|
%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 CODE_OF_CONDUCT.md CONTRIBUTING.md CREDITS README.md samples UPGRADE
|
|
%license LICENSE
|
|
|
|
%changelog
|