%define _requires_exceptions pear(HTML/Template/Flexy/Filter/SimpleTags.php) %define upstream_name HTML_Template_Flexy %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 1.3.12 Release: %mkrel 3 Summary: An extremely powerful Tokenizer driven Template engine License: PHP License Group: Development/PHP Source0: http://pear.php.net/get/HTML_Template_Flexy-%{version}.tgz URL: http://pear.php.net/package/HTML_Template_Flexy BuildRequires: php-pear >= 1.4.7 BuildArch: noarch %description HTML_Template_Flexy started it's life as a simplification of HTML_Template_Xipe, however in Version 0.2, It became one of the first template engine to use a real Lexer, rather than regex'es, making it possible to do things like ASP.net or Cold Fusion tags. However, it still has a very simple set of goals. - Very Simple API, o easy to learn... o prevents to much logic going in templates - Easy to write document'able code o By using object vars for a template rather than 'assign', you can use phpdoc comments to list what variable you use. - Editable in WYSIWYG editors o you can create full featured templates, that doesnt get broken every time you edit with Dreamweaver(tm) or Mozilla editor o Uses namespaced attributes to add looping/conditionals - Extremely Fast, o runtime is at least 4 time smaller than most other template engines (eg. Smarty) o uses compiled templates, as a result it is many times faster on blocks and loops than than Regex templates (eg. IT/phplib) - Safer (for cross site scripting attacks) o All variables default to be output as HTML escaped (overridden with the :h modifier) - Multilanguage support o Parses strings out of template, so you can build translation tools o Compiles language specific templates (so translation is only done once, not on every request) - Full dynamic element support (like ASP.NET), so you can pick elements to replace at runtime Features: - {variable} to echo $object->variable - {method()} to echo $object->method(); - {foreach:var,key,value} to PHP foreach loops - tag attributes FLEXY:FOREACH, FLEXY:IF for looping and conditional HTML inclusion - {if:variable} to PHP If statement - {if:method()} to PHP If statement - {else:} and {end:} to close or alternate If statements - FORM to HTML_Template_Flexy_Element's - replacement of INPUT, TEXTAREA and SELECT tags with HTML_Template_Flexy_Element code use FLEXY:IGNORE (inherited) and FLEXY:IGNOREONLY (single) to prevent replacements - FLEXY:START/FLEXY:STARTCHILDREN tags to define where template starts/finishes - support for urlencoded braces {} in HTML attributes. - documentation in the pear manual - examples at http://cvs.php.net/cvs.php/pear/HTML_Template_Flexy/tests/ %prep %setup -c -T pear -v -c pearrc \ -d php_dir=%{peardir} \ -d doc_dir=/docs \ -d bin_dir=%{_bindir} \ -d data_dir=%{peardir}/data \ -d test_dir=%{peardir}/tests \ -d ext_dir=%{_libdir} \ -s %build %install rm -rf %{buildroot} pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} # Clean up unnecessary files rm pearrc rm %{buildroot}/%{peardir}/.filemap rm %{buildroot}/%{peardir}/.lock rm -rf %{buildroot}/%{peardir}/.registry rm -rf %{buildroot}%{peardir}/.channels rm %{buildroot}%{peardir}/.depdb rm %{buildroot}%{peardir}/.depdblock mv %{buildroot}/docs . # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package.xml cp -p package.xml %{buildroot}%{xmldir}/HTML_Template_Flexy.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/HTML_Template_Flexy.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/HTML_Template_Flexy fi %files %defattr(-,root,root) %doc docs/HTML_Template_Flexy/* %{peardir}/* %{xmldir}/HTML_Template_Flexy.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.3.12-3.mga3 + Revision: 376276 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Mar 04 2012 spuhler <spuhler> 1.3.12-2.mga2 + Revision: 217774 - added define _requires_exceptions pear(HTML/Template/Flexy/Filter/SimpleTags.php) to accomodate for spleeing error on source package * Mon Jan 23 2012 spuhler <spuhler> 1.3.12-1.mga2 + Revision: 200055 - upgrade to 1.3.12 pearized spec file * Sat Mar 26 2011 spuhler <spuhler> 1.3.11-2.mga1 + Revision: 77730 - added _requires_exceptions pear(HTML/Template/Flexy/Filter/SimpleTags.php) increase rel for rebuild * Fri Feb 25 2011 spuhler <spuhler> 1.3.11-1.mga1 + Revision: 59292 - renamed the source from tgz to tar.gz - updated to Version: 1.3.11 Rel to 1 * Mon Feb 07 2011 spuhler <spuhler> 1.3.10-2.mga1 + Revision: 48405 - increased rel to 2 for rebuild * Mon Jan 17 2011 spuhler <spuhler> 1.3.10-1.mga1 + Revision: 20845 - removed buildroot definition from .spec commented the if mdkversion lines - imported package php-pear-HTML_Template_Flexy