%define _class HTML %define _subclass Template %define upstream_name %{_class}_%{_subclass}_Sigma %define _requires_exceptions pear())\\|pear(PHPUnit.php) Name: php-pear-%{upstream_name} Version: 1.2.0 Release: %mkrel 6 Summary: Integrated Templates API implemetation with template 'compilation' License: PHP License Group: Development/PHP URL: http://pear.php.net/package/HTML_Template_Sigma/ Source0: http://download.pear.php.net/package/%{upstream_name}-%{version}.tgz Requires(post): php-pear Requires(preun): php-pear Requires: php-pear BuildArch: noarch BuildRequires: php-pear %description HTML_Template_Sigma implements Integrated Templates API designed by Ulf Wendel. Features: - Nested blocks. Nesting is controlled by the engine. - Ability to include files from within template: <!-- INCLUDE --> - Automatic removal of empty blocks and unknown variables (methods to manually tweak/override this are also available) - Methods for runtime addition and replacement of blocks in templates - Ability to insert simple function calls into templates: func_uppercase('Hello world!') and to define callback functions for these - 'Compiled' templates: the engine has to parse a template file using regular expressions to find all the blocks and variable placeholders. This is a very "expensive" operation and is an overkill to do on every page request: templates seldom change on production websites. Thus this feature: an internal representation of the template structure is saved into a file and this file gets loaded instead of the source one on subsequent requests (unless the source changes) - PHPUnit-based tests to define correct behaviour - Usage examples for most of the features are available, look in the docs/ directory %prep %setup -q -c mv package.xml %{upstream_name}-%{version}/%{upstream_name}.xml %install rm -rf %{buildroot} cd %{upstream_name}-%{version} pear install --nodeps --packagingroot %{buildroot} %{upstream_name}.xml rm -rf %{buildroot}%{_datadir}/pear/.??* rm -rf %{buildroot}%{_datadir}/pear/docs rm -rf %{buildroot}%{_datadir}/pear/tests install -d %{buildroot}%{_datadir}/pear/packages install -m 644 %{upstream_name}.xml %{buildroot}%{_datadir}/pear/packages %clean rm -rf %{buildroot} #%post #%if %mdkversion < 201000 #pear install --nodeps --soft --force --register-only \ # %{_datadir}/pear/packages/%{upstream_name}.xml >/dev/null || : #%endif #%preun #%if %mdkversion < 201000 #if [ "$1" -eq "0" ]; then # pear uninstall --nodeps --ignore-errors --register-only \ # %{pear_name} >/dev/null || : #fi #%endif %files %defattr(-,root,root) %doc %{upstream_name}-%{version}/docs/* %{_datadir}/pear/%{_class} %{_datadir}/pear/packages/%{upstream_name}.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.2.0-6.mga3 + Revision: 376297 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Jan 17 2011 spuhler <spuhler> 1.2.0-5.mga1 + Revision: 20865 - removed buildroot definition from .spec commented the if mdkversion lines - imported package php-pear-HTML_Template_Sigma