]> git.pld-linux.org Git - packages/php-pear-HTML_Template_Flexy.git/blob - php-pear-HTML_Template_Flexy.spec
- 1.2.3
[packages/php-pear-HTML_Template_Flexy.git] / php-pear-HTML_Template_Flexy.spec
1 %include        /usr/lib/rpm/macros.php
2 %define         _class          HTML
3 %define         _subclass       Template
4 %define         _status         stable
5 %define         _pearname       %{_class}_%{_subclass}_Flexy
6
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}
10 Version:        1.2.3
11 Release:        1
12 License:        PHP 2.02
13 Group:          Development/Languages/PHP
14 Source0:        http://pear.php.net/get/%{_pearname}-%{version}.tgz
15 # Source0-md5:  9cfaf2d23563a2d3784f5e04c7c4a97a
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.4.2-11
20 Requires:       php-common >= 3:4.3
21 Requires:       php-pear
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 # exclude optional dependencies
26 %define         _noautoreq      'pear(HTML/Javascript.*)' 'pear(File/Gettext.*)' 'pear(Translation2.*)'
27
28 %description
29 HTML_Template_Flexy started its life as a simplification of
30 HTML_Template_Xipe, however in version 0.2, it became one of the first
31 template engine to use a real Lexer, rather than regexes, making it
32 possible to do things like ASP.net or Cold Fusion tags. However, it
33 still has a very simple set of goals.
34 - Very Simple API,
35         - easy to learn...
36         - prevents to much logic going in templates
37 - Easy to write documentable code
38         - By using object vars for a template rather than 'assign',
39           you can use PHPDoc comments to list what variable you use.
40 - Editable in WYSIWYG editors
41         - you can create full featured templates, that don't get
42           broken every time you edit with Dreamweaver(tm) or Mozilla
43           editor
44         - Uses namespaced attributes to add looping/conditionals
45 - Extremely Fast
46         - runtime is at least 4 time smaller than most other template
47           engines (eg. Smarty)
48         - uses compiled templates, as a result it is many times faster
49           on blocks and loops than than Regex templates (eg.
50           IT/phplib)
51 - Safer (for cross-site scripting attacks)
52         - All variables default to be output as HTML escaped
53           (overridden with the :h modifier)
54 - Multilanguage support
55         - Parses strings out of template, so you can build translation
56           tools
57         - Compiles language specific templates (so translation is only
58           done once, not on every request)
59 - Full dynamic element support (like ASP.NET), so you can pick
60           elements to replace at runtime
61
62 The long term plan for Flexy is to be integrated as a backend for the
63 Future Template Package (A BC wrapper will be made available - as the
64 author needs to use it too).
65
66 In PEAR status of this package is: %{_status}.
67
68 %description -l pl
69 HTML_Template_Flexy pocz±tkowo by³ uproszczeniem HTML_Template_Xipe,
70 jednak od wersji 0.2 sta³ siê jednym z pierwszych silników szablonów
71 u¿ywaj±cych prawdziwego analizatora leksykalnego zamiast wyra¿eñ
72 regularnych, co umo¿liwia robienie rzeczy w stylu ASP.net czy
73 znaczników Cold Fusion. Jednak nadal ma bardzo prosty zbiór
74 zastosowañ. Cechy silnika:
75 - bardzo proste API - ³atwe do nauczenia, zapobiega umieszczaniu zbyt
76   du¿ej ilo¶ci logiki w szablonach
77 - ³atwe pisanie dokumentowalnego kodu - poprzez u¿ycie zmiennych
78   obiektowych dla szablonu zamiast przypisywania mo¿na u¿ywaæ
79   komentarzy phpDoc do wypisywania u¿ywanych zmiennych
80 - edytowalny w edytorach WYSIWYG - mo¿na tworzyæ w pe³ni funkcjonalne
81   szablony, które nie psuj± siê po ka¿dym u¿yciu Dreamweavera(tm) czy
82   edytora Mozilli; przy dodawaniu pêtli i warunków u¿ywane s± atrybuty
83   z przestrzeniami nazw
84 - ekstremalnie szybki - kod uruchomieniowy jest przynajmniej 4 razy
85   mniejszy ni¿ wiêkszo¶æ innych silników szablonów (np. Smarty); u¿ywa
86   skompilowanych szablonów, dziêki czemu jest wiele razy szybszy na
87   blokach i pêtlach ni¿ szablony oparte na wyra¿eniach regularnych
88   (np. IT/phplib)
89 - bezpieczniejszy (pod k±tem ataków cross-site scripting) - wszystkie
90   zmienne domy¶lnie s± wypisywane z u¿yciem sekwencji kontrolnych HTML
91   (mo¿na to zmieniæ modyfikatorem :h)
92 - wspiera wielojêzyczno¶æ - przetwarza ³añcuchy z szablonu, co pozwala
93   na zbudowanie narzêdzi do t³umaczenia; kompiluje specyficzne dla
94   jêzyka szablony, dziêki czemu t³umaczenie jest robione tylko raz, a
95   nie przy ka¿dym ¿±daniu
96 - w pe³ni obs³uguje dynamiczne elementy (jak ASP.NET), dziêki czemu
97   mo¿na pobieraæ elementy do zast±pienia w czasie dzia³ania.
98
99 D³ugoterminowym planem rozwoju Flexy jest zintegrowanie jako backend
100 dla Future Template Package (dostêpny bêdzie wrapper BC, jako ¿e autor
101 te¿ musi tego u¿ywaæ).
102
103 Ta klasa ma w PEAR status: %{_status}.
104
105 %package tests
106 Summary:        Tests for PEAR::%{_pearname}
107 Summary(pl):    Testy dla PEAR::%{_pearname}
108 Group:          Development
109 Requires:       %{name} = %{epoch}:%{version}-%{release}
110
111 %description tests
112 Tests for PEAR::%{_pearname}.
113
114 %description tests -l pl
115 Testy dla PEAR::%{_pearname}.
116
117 %prep
118 %pear_package_setup
119 install -d docs/%{_pearname}
120 mv ./%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/example.ini docs/%{_pearname}
121 cd ./%{php_pear_dir}/%{_class}/%{_subclass}
122 %patch0 -p1
123 %patch1 -p1
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT%{php_pear_dir}
128 %pear_package_install
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post
134 if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
135         cat %{_docdir}/%{name}-%{version}/optional-packages.txt
136 fi
137
138 %files
139 %defattr(644,root,root,755)
140 %doc install.log optional-packages.txt
141 %doc docs/%{_pearname}/example.ini
142 %{php_pear_dir}/.registry/*.reg
143 %{php_pear_dir}/%{_class}/%{_subclass}/Flexy
144 %{php_pear_dir}/%{_class}/%{_subclass}/Flexy.php
145
146 %files tests
147 %defattr(644,root,root,755)
148 %{php_pear_dir}/tests/*
This page took 0.799017 seconds and 4 git commands to generate.