Files
perl-Template-Toolkit-Simple/perl-Template-Toolkit-Simple.spec
2025-08-12 18:17:32 +02:00

78 lines
2.5 KiB
RPMSpec

#
# spec file for package perl-Template-Toolkit-Simple
#
# 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 Template-Toolkit-Simple
Name: perl-Template-Toolkit-Simple
Version: 0.310.0
Release: 0
# 0.31 -> normalize -> 0.310.0
%define cpan_version 0.31
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Simple Interface to Template Toolkit
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/I/IN/INGY/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Template) >= 2.22
BuildRequires: perl(YAML::XS) >= 0.37
Requires: perl(Template) >= 2.22
Requires: perl(YAML::XS) >= 0.37
Provides: perl(Template::Toolkit::Simple) = %{version}
%undefine __perllib_provides
Recommends: perl(JSON::XS)
Recommends: perl(XML::Simple)
%{perl_requires}
%description
Template Toolkit is the best Perl template framework. The only problem with
it is that using it for simple stuff is a little bit cumbersome. Also there
is no good utility for using it from the command line.
This module is a simple wrapper around Template Toolkit. It exports a
function called 'tt' which returns a new Template::Toolkit::Simple object.
The object supports method calls for setting all the Template Toolkit
options.
This module also installs a program called 'tt-render' which you can use
from the command line to render templates with all the power of the Perl
object. All of the object methods become command line arguments in the
command line version.
%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 Changes CONTRIBUTING README
%license LICENSE
%changelog