88 lines
3.5 KiB
RPMSpec
88 lines
3.5 KiB
RPMSpec
#
|
|
# spec file for package perl-HTML-Template-Expr
|
|
#
|
|
# 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-Expr
|
|
Name: perl-HTML-Template-Expr
|
|
Version: 0.70.0
|
|
Release: 0
|
|
# 0.07 -> normalize -> 0.70.0
|
|
%define cpan_version 0.07
|
|
#Upstream: HTML::Template::Expr : HTML::Template extension adding expression support This module is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with this module. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. You should have received a copy of the Artistic License with this module, in the file ARTISTIC. If not, I'll be glad to provide one. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: HTML::Template extension adding expression support
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SA/SAMTREGAR/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(HTML::Template) >= 2.4
|
|
BuildRequires: perl(Parse::RecDescent)
|
|
Requires: perl(HTML::Template) >= 2.4
|
|
Requires: perl(Parse::RecDescent)
|
|
Provides: perl(HTML::Template::Expr) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module provides an extension to HTML::Template which allows
|
|
expressions in the template syntax. This is purely an addition - all the
|
|
normal HTML::Template options, syntax and behaviors will still work. See
|
|
HTML::Template for details.
|
|
|
|
Expression support includes comparisons, math operations, string operations
|
|
and a mechanism to allow you add your own functions at runtime. The basic
|
|
syntax is:
|
|
|
|
<TMPL_IF EXPR="banana_count > 10">
|
|
I've got a lot of bananas.
|
|
</TMPL_IF>
|
|
|
|
This will output "I've got a lot of bananas" if you call:
|
|
|
|
$template->param(banana_count => 100);
|
|
|
|
In your script. <TMPL_VAR>s also work with expressions:
|
|
|
|
I'd like to have <TMPL_VAR EXPR="banana_count * 2"> bananas.
|
|
|
|
This will output "I'd like to have 200 bananas." with the same param() call
|
|
as above.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%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 ANNOUNCE Changes README
|
|
%license ARTISTIC GPL
|
|
|
|
%changelog
|