Tom Callaway 16 years ago
parent fe416b6366
commit ada9585637

@ -1 +1,2 @@
Template-Toolkit-2.20.tar.gz
Template-Toolkit-2.22.tar.gz
TT_v222_html_docs.tar.gz

@ -1,11 +1,12 @@
Name: perl-Template-Toolkit
Version: 2.20
Version: 2.22
Release: 1%{?dist}
Summary: Template processing system
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://www.template-toolkit.org/
Source0: http://search.cpan.org/CPAN/authors/id/A/AB/ABW/Template-Toolkit-%{version}.tar.gz
Source1: http://tt2.org/download/TT_v222_html_docs.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(Test::More), tetex-dvips, tetex-latex
@ -13,6 +14,8 @@ BuildRequires: perl(AppConfig), perl(Text::Autoformat), perl(GD::Graph3d), perl
BuildRequires: perl(GD::Text), perl(Image::Info), perl(Image::Size), perl(Pod::POM)
BuildRequires: perl(XML::DOM), perl(XML::RSS), perl(XML::XPath)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Provides: perl-Template-Toolkit-examples = %{version}-%{release}
Obsoletes: perl-Template-Toolkit-examples < %{version}-%{release}
%description
The Template Toolkit is a collection of modules which implement a
@ -22,17 +25,10 @@ dynamic web content, but it can be used equally well for processing
any other kind of text based documents: HTML, XML, POD, PostScript,
LaTeX, and so on.
%package examples
Summary: Examples of how to use Template Toolkit
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description examples
%{summary}.
%prep
%setup -q -n Template-Toolkit-%{version}
%setup -q -n Template-Toolkit-%{version} -a 1
find lib -type f | xargs chmod -c -x
find TT_v*_html_docs -depth -name .svn -type d -exec rm -rf {} \;
# Filter false positive provides.
cat <<EOF > %{name}-prov
@ -46,17 +42,16 @@ EOF
%define __perl_provides %{_builddir}/Template-Toolkit-%{version}/%{name}-prov
chmod +x %{__perl_provides}
# enable examples, docstyle
sed -i 's|#html_docstyle();|html_docstyle();|g' Makefile.PL
sed -i 's|#html_examples();|html_examples();|g' Makefile.PL
# Convert file to UTF-8
iconv -f iso-8859-1 -t utf-8 -o Changes{.utf8,}
mv Changes{.utf8,}
%build
CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor \
TT_PREFIX=$RPM_BUILD_ROOT%{_datadir}/tt2 TT_DBI=n TT_ACCEPT=y TT_BUILD_DOCS=y
TT_DBI=n TT_ACCEPT=y
make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"
%install
rm -rf $RPM_BUILD_ROOT _docs
# install (+ INSTALLARCHLIB) instead of pure_install to get docs
# and the template library installed too
make install \
@ -68,9 +63,7 @@ find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
mkdir _docs ; mv $RPM_BUILD_ROOT%{_datadir}/tt2/docs _docs
# Nuke buildroot where it hides
sed -i "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_datadir}/tt2/examples/ttree.cfg
sed -i "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{perl_vendorarch}/Template/Config.pm
%check
@ -81,23 +74,20 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes HACKING README TODO _docs/*
%doc Changes HACKING README TODO TT_v*_html_docs/*
%{_bindir}/tpage
%{_bindir}/ttree
%{perl_vendorarch}/Template.pm
%{perl_vendorarch}/auto/Template
%{perl_vendorarch}/Template
%{_datadir}/tt2
# The examples get their own package due to size.
%exclude %{_datadir}/tt2/examples
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%files examples
%defattr(-,root,root,-)
%{_datadir}/tt2/examples
%changelog
* Sat Jul 25 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.22-1
- update to 2.22
- obsolete examples package, upstream got rid of them
* Fri Mar 13 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.20-1
- update to 2.20

@ -1 +1,2 @@
b1fac2d5df7b6b5f194af0ac0d9b7c73 Template-Toolkit-2.20.tar.gz
d98277f6420e5da6b93d99a8db2b3934 Template-Toolkit-2.22.tar.gz
587d909170fd7dcbe8a51485c49fa3e0 TT_v222_html_docs.tar.gz

Loading…
Cancel
Save