perl-Text-MicroTemplate/perl-Text-MicroTemplate.spec

Name: perl-Text-MicroTemplate
Summary: Micro template engine in Perl
Version: 0.18
Release: 1
License: Artistic/GPL
Group: Applications/CPAN
URL: http://search.cpan.org/dist/Text-MicroTemplate/
Description: Text::MicroTemplate is a standalone, fast, intelligent, extensible template engine with following features.

Text::MicroTemplate does not rely on other CPAN modules.

Based on Mojo::Template, expressions in the template is perl code.

Text::MicroTemplate automatically escapes variables when and only when necessary.

Text::MicroTemplate does not provide features like template cache or including other files by itself. However, it is easy to add you own (that suites the most to your application), by wrapping the result of the module (which is a perl expression).

The module only provides basic building blocks for a template engine. Refer to Text::MicroTemplate::File for higher-level interface.

CentOS 7 x86_64

The build was succesful. The following RPMs were generated:

Build Status

CentOS 6 x86_64

The build was succesful. The following RPMs were generated:

Build Status

Contents

The spec file used by the build system currently has the following contents:

# $Id$
# Authority: shuff
# Upstream: Kazuho Oku <kazuhooku$gmail,com>

%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)

%define real_name Text-MicroTemplate

Summary: Micro template engine in Perl
Name: perl-Text-MicroTemplate
Version: 0.18
Release: 1%{?dist}
License: Artistic/GPL
Group: Applications/CPAN
URL: http://search.cpan.org/dist/Text-MicroTemplate/

Source: http://search.cpan.org/CPAN/authors/id/K/KA/KAZUHO/Text-MicroTemplate-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch: noarch
BuildRequires: perl >= 5.8.0
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
BuildRequires: rpm-macros-rpmforge
Requires: perl >= 5.8.0
Requires: perl(File::Temp)

### remove autoreq Perl dependencies
%filter_from_requires /^perl.*/d
%filter_setup

%description
Text::MicroTemplate is a standalone, fast, intelligent, extensible template
engine with following features.

* standalone

Text::MicroTemplate does not rely on other CPAN modules.

* fast

Based on Mojo::Template, expressions in the template is perl code.

* intelligent

Text::MicroTemplate automatically escapes variables when and only when
necessary.

* extensible

Text::MicroTemplate does not provide features like template cache or including
other files by itself. However, it is easy to add you own (that suites the most
to your application), by wrapping the result of the module (which is a perl
expression).

The module only provides basic building blocks for a template engine. Refer to
Text::MicroTemplate::File for higher-level interface.

%prep
%setup -n %{real_name}-%{version}

# fix problem with modules generated by older versions of Dist::Zilla
#%{?el5:%{__perl} -pi -e '/.*ExtUtils::MakeMaker.*6\.31.*/ && s/6\.3\d/6.30/' Makefile.PL}

%build
%{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install
#%{__rm} -rf %{buildroot}%{perl_archlib} %{buildroot}%{perl_vendorarch}

# fix for stupid strip issue
#%{__chmod} -R u+w %{buildroot}/*

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc Changes META.yml README contrib/
%doc %{_mandir}/man?/*
%{perl_vendorlib}/Text/MicroTemplate.pm
%{perl_vendorlib}/Text/MicroTemplate/*
#%exclude %{perl_archlib}/perllocal.pod
%exclude %{perl_vendorarch}/auto/*/*/.packlist

%changelog
* Tue Jul 19 2011 Steve Huff <shuff@vecna.org> - 0.18-1
- Initial package.