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