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