#
# spec file for package perl-Text-Template
#
# Copyright (c) 2022 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 Text-Template
Name:           perl-Text-Template
Version:        1.61
Release:        1.8
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Expand template text with embedded Perl
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/M/MS/MSCHOUT/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Test::More::UTF8)
BuildRequires:  perl(Test::Warnings)
%{perl_requires}

%description
This is a library for generating form letters, building HTML pages, or
filling in templates generally. A `template' is a piece of text that has
little Perl programs embedded in it here and there. When you `fill in' a
template, you evaluate the little programs and replace them with their
values.

You can store a template in a file outside your program. People can modify
the template without modifying the program. You can separate the formatting
details from the main code, and put the formatting parts of the program
into the template. That prevents code bloat and encourages functional
separation.

%prep
%autosetup  -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -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 README
%license LICENSE

%changelog
* Fri Apr 29 2022 Tina Müller <timueller+perl@suse.de>
- updated to 1.61
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.61  2022-04-28
  - Skip taint tests if perl was compiled with taint disabled.  (Thanks Neil Bowers) [GitHub PR #20]
* Sat Sep  4 2021 Tina Müller <timueller+perl@suse.de>
- updated to 1.60
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.60  2021-09-03
  - Fix another POD syntax error.
* Sat Jul  4 2020 Tina Müller <timueller+perl@suse.de>
- updated to 1.59
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.59  2020-07-03
  - Fix syntax error in POD example code.
* Sat Sep 28 2019 <timueller+perl@suse.de>
- updated to 1.58
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.58  2019-09-27
  - Remove hard coded (old) version number from README
* Tue Sep 10 2019 <timueller+perl@suse.de>
- updated to 1.57
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.57  2019-09-09
* Thu Jul 25 2019 Stephan Kulow <coolo@suse.com>
- updated to 1.56
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.56  2019-07-09
  - Fix typos in Changes
* Tue Feb 26 2019 Stephan Kulow <coolo@suse.com>
- updated to 1.55
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.55  2019-02-25
  - Improve AppVeyor tests for older Perls (Thanks Roy Ivy)
  - Check for Test::More 0.94 and skip tests if not installed where
    done_testing() is used (Thanks Roy Ivy).
  - Improve workaround for broken Win32 File::Temp taint failure (Thanks Roy Ivy).
  - Skip/todo tests which fail under Devel::Cover (Thanks Roy Ivy)
  - Add checks and skip_all checks for non-core test modules (Thanks Roy Ivy)
* Mon Jan 14 2019 Stephan Kulow <coolo@suse.com>
- updated to 1.54
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.54  2019-01-13
  - Fix tempfile creation during tests on Win32
* Thu May  3 2018 coolo@suse.com
- updated to 1.53
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.53  2018-05-02
  - Add support for decoding template files via ENCODING constructor arg
    [github #11]
  - Docs cleanup: replace indirect-object style examples and use class method
    style constructor calls in the POD docs
  - Docs cleanup: remove hard tabs from POD, replace dated, unfair synopsis
    [github #5], convert "THANKS" section to a POD list
* Tue Mar 20 2018 coolo@suse.com
- updated to 1.52
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.52  2018-03-19
  - Fix possible 'Subroutine ... redefined' warning (Github #10)
* Mon Mar  5 2018 coolo@suse.com
- updated to 1.51
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.51  2018-03-04
  - Add test for nested tags breakage that happened in v1.46
  - Turn off strict+warnings in sections where template code is eval'ed
    [github #9]
* Mon Feb 12 2018 coolo@suse.com
- updated to 1.50
  see /usr/share/doc/packages/perl-Text-Template/Changes
  1.50  2018-02-10
  * ** Revert support for identical start/end delimiters (e.g.: @@foo@@, XXfooXX)
    due to breakage with nested tags (see
    https://github.com/mschout/perl-text-template/issues/8).  Will revisit
    this in a future release.
  1.49  2018-02-07
  - Fix failing tests in v1.48 under perl < 5.8.9
  1.48  2018-02-07
  - remove COPYING and Artistic files from the dist.  These are replaced by
    the Dist::Zilla generated LICENSE file.
  - use strict/warnings (thanks Mohammad S Anwar)
  - remove $VERSION checks from tests. This makes it easier to run the test
    with Dist::Zilla and avoids maintenance issue of updating the tests for
    each release (Thanks Andrew Ruder).
  - Allow precompiled templates to work with preprocessing [#29928] (Thanks
    Nik LaBelle)
  - Add "strict" option to fill_in().  This adds "use strict" and "use vars
    (...)" to the prepend section, and only the keys of the HASH option are
    allowed in the template.  (Thanks Desmond Daignault, Kivanc Yazan, CJM)
    [55696]
  - Fix templates with inline comments without newline after comment for perl
    < 5.18 [34292]
  - Don't use bareword file handles
  - use three arg form of open()
  - Fix BROKEN behaviour so that it returns the text accumulated so far on
    undef as documented [28974]
  - Source code cleanups
  - Minimum perl version is now 5.8.0
  - Allow start/end delimiters to be identical (e.g.: @@foo@@, XXfooXX)
    (Thanks mirod) [46639]
  - Fix + document the FILENAME parameter to fill_in() (Thanks VDB) [106093]
  - Test suite cleanups:
    + turn on strict/warnings for all tests
    + run tests through perltidy and formatting cleanup
    + remove number prefixes from test names
    + use Test::More instead of generating TAP by hand
    + use three-arg form of open()
    + don't use indirect object syntax
    + don't use bareword file handles
    + use File::Temp to generate temporary files
* Tue Feb 28 2017 coolo@suse.com
- updated to 1.47
  see /usr/share/doc/packages/perl-Text-Template/Changes
* Wed Jun  5 2013 cfarrell@suse.com
- license update: GPL-2.0+ or ClArtistic
  The license choice is for GPL-2.0+ or the Clarified Artistic License
  (ClArtistic on spdx.org/licenses/ClArtistic)
* Tue Jun  4 2013 coolo@suse.com
- updated to 1.46
    Thanks to Rik Signes, there is a new
    Text::Template->append_text_to_output method, which
    Text::Template always uses whenever it wants to emit output.
    You can subclass this to get control over the output, for
    example for postprocessing.
    A spurious warning is no longer emitted when the TYPE
    parameter to ->new is omitted.
* Wed Dec 14 2011 coolo@suse.com
- fix license to be in spdx.org format
* Fri Nov 18 2011 coolo@suse.com
- use original .tar.gz
* Tue Nov 30 2010 coolo@novell.com
- switch to perl_requires macro
* Wed Apr 21 2010 chris@computersalat.de
- update to 1.45
  - no ChangeLog :(
- cleanup spec
  - recreated with cpanspec
* Sat Mar  3 2007 aj@suse.de
- New package.