71d452d
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
71d452d
%global pear_name HTML_Template_IT
71d452d
71d452d
Name:           php-pear-HTML-Template-IT
71d452d
Version:        1.3.0
71d452d
Release:        2%{?dist}
71d452d
Summary:        Integrated Templates
71d452d
71d452d
Group:          Development/Libraries
71d452d
License:        BSD
71d452d
URL:            http://pear.php.net/package/HTML_Template_IT
71d452d
Source0:        http://download.pear.php.net/package/%{pear_name}-%{version}.tgz
71d452d
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
71d452d
71d452d
BuildArch:      noarch
71d452d
BuildRequires:  php-pear >= 1:1.4.9-1.2
71d452d
Requires(post): %{__pear}
71d452d
Requires(postun): %{__pear}
71d452d
Provides:       php-pear(%{pear_name}) = %{version}
71d452d
71d452d
71d452d
%description
71d452d
HTML_Template_IT:
71d452d
The Isotemplate API is somewhat tricky for a beginner although it is the
71d452d
best one you can build.
71d452d
71d452d
Source and target can be block names or even handler names. This API gives
71d452d
you a maximum of flexibility but you always have to know what you do which 
71d452d
is quite unusual for php developer like me.
71d452d
If all blocks are within one file, the script knows how they are nested and
71d452d
in which way you have to parse them. IT knows that inner1 is a child of
71d452d
block2, there's no need to tell him about this.
71d452d
71d452d
Features :
71d452d
  * Nested blocks
71d452d
  * Include external file
71d452d
  * Custom tags format 
71d452d
71d452d
HTML_Template_ITX :
71d452d
With this class you get the full power of the php lib template class.
71d452d
You may have one file with blocks in it but you have as well one main file
71d452d
and multiple files one for each block. This is quite useful when you have
71d452d
user configurable websites. Using blocks not in the main template allows
71d452d
you to modify some parts of your layout easily.
71d452d
 
71d452d
%prep
71d452d
%setup -q -c
71d452d
[ -f package2.xml ] || mv package.xml package2.xml
71d452d
mv package2.xml %{pear_name}-%{version}/%{name}.xml
71d452d
cd %{pear_name}-%{version}
71d452d
71d452d
%build
71d452d
cd %{pear_name}-%{version}
71d452d
# Empty build section, most likely nothing required.
71d452d
71d452d
%install
71d452d
cd %{pear_name}-%{version}
71d452d
rm -rf $RPM_BUILD_ROOT docdir
71d452d
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
71d452d
71d452d
71d452d
# Move documentation
71d452d
mkdir -p docdir
71d452d
mv $RPM_BUILD_ROOT%{pear_docdir}/* docdir
71d452d
sed -i -e 's/\r//' docdir/%{pear_name}/LICENSE
71d452d
sed -i 's/\r//' docdir/%{pear_name}/examples/sample_it.php 
71d452d
sed -i 's/\r//' docdir/%{pear_name}/examples/sample_itx_addblockfile.php
71d452d
71d452d
# Clean up unnecessary files
71d452d
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
71d452d
71d452d
# Install XML package description
71d452d
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
71d452d
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
71d452d
71d452d
%clean
71d452d
rm -rf $RPM_BUILD_ROOT
71d452d
71d452d
%post
71d452d
%{__pear} install --nodeps --soft --force --register-only \
71d452d
    %{pear_xmldir}/%{name}.xml >/dev/null || :
71d452d
%postun
71d452d
if [ $1 -eq 0 ] ; then
71d452d
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
71d452d
        pear.php.net/%{pear_name} >/dev/null || :
71d452d
fi
71d452d
71d452d
%files
71d452d
%defattr(-,root,root,-)
71d452d
%doc %{pear_name}-%{version}/docdir/%{pear_name}/*
71d452d
%{pear_xmldir}/%{name}.xml
71d452d
%dir %{pear_phpdir}/HTML
71d452d
%dir %{pear_phpdir}/HTML/Template
71d452d
%{pear_phpdir}/HTML/Template/IT.php
71d452d
%{pear_phpdir}/HTML/Template/ITX.php
71d452d
%{pear_phpdir}/HTML/Template/IT_Error.php
71d452d
%{pear_testdir}/HTML_Template_IT
71d452d
71d452d
71d452d
71d452d
%changelog
71d452d
* Fri Mar 13 2010 David Hannequin <david.hannequin@gmail.com> - 1.3.0-2
71d452d
- Fix wrong end of file 
71d452d
71d452d
* Fri Mar 12 2010 David Hannequin <david.hannequin@gmail.com> - 1.3.0-1
71d452d
- Update 
71d452d
71d452d
* Tue Mar 11 2010 David Hannequin <david.hannequin@gmail.com> - 1.2.1-6
71d452d
- Fix list of files,
71d452d
- Fix spelling error.
71d452d
71d452d
* Wed Feb 22 2010 David Hannequin <david.hannequin@gmail.com> - 1.2.1-5
71d452d
- Fix permission,
71d452d
- Review description.
71d452d
71d452d
* Wed Feb 17 2010 David Hannequin <david.hannequin@gmail.com> - 1.2.1-4
71d452d
- Fix summary,
71d452d
- New build method. 
71d452d
71d452d
* Mon Feb 15 2010 David Hannequin <david.hannequin@gmail.com> - 1.2.1-2
71d452d
- Add requires,
71d452d
- Add macros.
71d452d
71d452d
* Fri Dec 4 2009 David Hannequin <david.hannequin@gmail.com> - 1.2.1-1
71d452d
- Initial release.