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 its 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
58 The long term plan for Flexy is to be integrated as a backend for the
59 Future Template Package (A BC wrapper will be made available - as the
60 author needs to use it too!)
62 In PEAR status of this package is: %{_status}.
65 Flexy Template to silnik szablonów do konwertera kodu PHP, oparty na
66 Simple Template i podobny do Smarty. Powinien byæ bardzo szybki, jest
67 ³atwy w rozszerzaniu, rozwijaniu i u¿ywaniu dowolnej sk³adni
68 szablonów. Domy¶lny filtr (SimpleTags) zawiera: zmienne, pêtle
69 foreach, warunki, wywo³ania metod, w³±czanie kodu, obs³uguje znaczniki
70 zakodowane w URL-ach - wiêc mo¿e modyfikowaæ szablony w Mozilli itp.
72 - RtfSimpletags - do tworzenia dokumentów RTF dla Worda,
73 - BodyOnly - wycinaj±cy nag³ówek i stopkê z szablonu,
74 - Php - wycinaj±cy kod PHP z szablonu,
75 - Email - do przetwarzania szablonów e-mail.
77 Ta klasa ma w PEAR status: %{_status}.
81 cd %{_pearname}-%{version}
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/{Compiler/{Flexy,Standard,Regex},Element,Plugin,Token}
89 install %{_pearname}-%{version}/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}
90 install %{_pearname}-%{version}/Flexy/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy
91 install %{_pearname}-%{version}/Flexy/Compiler/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler
92 install %{_pearname}-%{version}/Flexy/Compiler/Flexy/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Flexy
93 install %{_pearname}-%{version}/Flexy/Compiler/Standard/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Standard
94 install %{_pearname}-%{version}/Flexy/Compiler/Regex/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Regex
95 install %{_pearname}-%{version}/Flexy/Element/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Element
96 install %{_pearname}-%{version}/Flexy/Plugin/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Plugin
97 install %{_pearname}-%{version}/Flexy/Token/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Token
100 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
104 %doc %{_pearname}-%{version}/{Flexy/example.ini,tests}
105 %{php_pear_dir}/%{_class}/%{_subclass}/Flexy
106 %{php_pear_dir}/%{_class}/%{_subclass}/Flexy.php