1 %include /usr/lib/rpm/macros.php
3 %define _subclass Template
5 %define _pearname %{_class}_%{_subclass}_Flexy
7 Summary: %{_pearname} - a flexible caching template engine based on SimpleTemplate
8 Summary(pl): %{_pearname} - elastyczny buforuj±cy silnik szablonów oparty na SimpleTemplate
9 Name: php-pear-%{_pearname}
13 Group: Development/Languages/PHP
14 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
15 # Source0-md5: 325a6993dd88c2fc99badf2170043e53
16 Patch0: %{name}-case_fix.patch
17 Patch1: %{name}-path_fix.patch
18 URL: http://pear.php.net/package/HTML_Template_Flexy/
19 BuildRequires: rpm-php-pearprov >= 4.0.2-98
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 HTML_Template_Flexy started it's life as a simplification of
26 HTML_Template_Xipe, however in version 0.2, it became one of the first
27 template engine to use a real Lexer, rather than regexes, making it
28 possible to do things like ASP.net or Cold Fusion tags. However, it
29 still has a very simple set of goals.
32 - prevents to much logic going in templates
33 - Easy to write documentable code
34 - By using object vars for a template rather than 'assign',
35 you can use PHPDoc comments to list what variable you use.
36 - Editable in WYSIWYG editors
37 - you can create full featured templates, that doesnt get
38 broken every time you edit with Dreamweaver(tm) or Mozilla
40 - Uses namespaced attributes to add looping/conditionals
42 - runtime is at least 4 time smaller than most other template
44 - uses compiled templates, as a result it is many times faster
45 on blocks and loops than than Regex templates (eg.
47 - Safer (for cross site scripting attacks)
48 - All variables default to be output as HTML escaped
49 (overridden with the :h modifier)
50 - Multilanguage support
51 - Parses strings out of template, so you can build translation
53 - Compiles language specific templates (so translation is only
54 done once, not on every request)
55 - Full dynamic element support (like ASP.NET), so you can pick
56 elements to replace at runtime
59 - {variable} to echo $object->variable
60 - {method()} to echo $object->method();
61 - {foreach:var,key,value} to PHP foreach loops
62 - tag attributes FLEXY:FOREACH, FLEXY:IF for looping and conditional
64 - {if:variable} to PHP If statement
65 - {if:method()} to PHP If statement
66 - {else:} and {end:} to close or alternate If statements
67 - FORM to HTML_Template_Flexy_Element's
68 - replacement of INPUT, TEXTAREA and SELECT tags with
69 HTML_Template_Flexy_Element code use FLEXY:IGNORE (inherited) and
70 FLEXY:IGNOREONLY (single) to prevent replacements
71 - FLEXY:START/FLEXY:STARTCHILDREN tags to define where template
73 - support for urlencoded braces {} in HTML attributes.
74 - documentation in the pear manual
77 http://cvs.php.net/cvs.php/pear/HTML_Template_Flexy/tests/
79 The long term plan for Flexy is to be integrated as a backend for the
80 Future Template Package (A BC wrapper will be made available - as I
83 In PEAR status of this package is: %{_status}.
86 Flexy Template to silnik szablonów do konwertera kodu PHP, oparty na
87 Simple Template i podobny do Smarty. Powinien byæ bardzo szybki, jest
88 ³atwy w rozszerzaniu, rozwijaniu i u¿ywaniu dowolnej sk³adni
89 szablonów. Domy¶lny filtr (SimpleTags) zawiera: zmienne, pêtle
90 foreach, warunki, wywo³ania metod, w³±czanie kodu, obs³uguje znaczniki
91 zakodowane w URL-ach - wiêc mo¿e modyfikowaæ szablony w Mozilli itp.
93 - RtfSimpletags - do tworzenia dokumentów RTF dla Worda,
94 - BodyOnly - wycinaj±cy nag³ówek i stopkê z szablonu,
95 - Php - wycinaj±cy kod PHP z szablonu,
96 - Email - do przetwarzania szablonów e-mail.
98 Ta klasa ma w PEAR status: %{_status}.
102 cd %{_pearname}-%{version}
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/{Compiler/{Flexy,Standard,Regex},Element,Plugin,Token}
110 install %{_pearname}-%{version}/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}
111 install %{_pearname}-%{version}/Flexy/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy
112 install %{_pearname}-%{version}/Flexy/Compiler/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler
113 install %{_pearname}-%{version}/Flexy/Compiler/Flexy/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Flexy
114 install %{_pearname}-%{version}/Flexy/Compiler/Standard/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Standard
115 install %{_pearname}-%{version}/Flexy/Compiler/Regex/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Regex
116 install %{_pearname}-%{version}/Flexy/Element/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Element
117 install %{_pearname}-%{version}/Flexy/Plugin/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Plugin
118 install %{_pearname}-%{version}/Flexy/Token/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Token
121 rm -rf $RPM_BUILD_ROOT
124 %defattr(644,root,root,755)
125 %doc %{_pearname}-%{version}/{Flexy/example.ini,tests}
126 %{php_pear_dir}/%{_class}/%{_subclass}/Flexy
127 %{php_pear_dir}/%{_class}/%{_subclass}/Flexy.php