1 %include /usr/lib/rpm/macros.php
3 %define _subclass Template
5 %define _pearname %{_class}_%{_subclass}_Sigma
7 Summary: %{_pearname} - Integrated Templates API implemetation with template 'compilation'
8 Summary(pl): %{_pearname} - Implementacja API Integrated Templates z "kompilacj±" szablonów
9 Name: php-pear-%{_pearname}
13 Group: Development/Languages/PHP
14 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
15 # Source0-md5: 487e1a9d72662b2a55693d1af48d6944
16 URL: http://pear.php.net/package/HTML_Template_Sigma/
17 BuildRequires: php-pear-PEAR
18 BuildRequires: rpm-php-pearprov >= 4.4.2-11
19 BuildRequires: rpmbuild(macros) >= 1.300
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _noautoreq 'pear(Sigma_api_testcase.php)'
29 HTML_Template_Sigma implements Integrated Templates API designed by
33 - Nested blocks. Nesting is controlled by the engine.
34 - Ability to include files from within template: <!-- INCLUDE -->
35 - Automatic removal of empty blocks and unknown variables (methods to
36 manually tweak/override this are also available)
37 - Methods for runtime addition and replacement of blocks in templates
38 - Ability to insert simple function calls into templates:
39 func_uppercase('Hello world!') and to define callback functions for
41 - 'Compiled' templates: the engine has to parse a template file using
42 regular expressions to find all the blocks and variable placeholders.
43 This is a very "expensive" operation and is an overkill to do on every
44 page request: templates seldom change on production websites. Thus
45 this feature: an internal representation of the template structure is
46 saved into a file and this file gets loaded instead of the source one
47 on subsequent requests (unless the source changes)
48 - PHPUnit-based tests to define correct behaviour
49 - Usage examples for most of the features are available, look in the
52 In PEAR status of this package is: %{_status}.
55 HTML_Template_Sigma jest implementacj± API Integrated Templates
56 zaprojektowanego przez Ulfa Wendla.
59 - zagnie¿d¿one bloki, kontrolowane przez silnik
60 - mo¿liwo¶æ do³±czania plików z szablonu: <!-- INCLUDE -->
61 - automatyczne usuwanie pustych bloków i nieznanych zmiennych
62 (dostêpne s± metody do rêcznego obej¶cia tego)
63 - metody do dodawania i podmieniania bloków z szablonów w czasie pracy
64 - mo¿liwo¶æ wstawiania do szablonów wywo³añ prostych funkcji:
65 func_uppercase('Hello world!') oraz definiowanie do tego funkcji
67 - "kompilowane" szablony: Silnik musi przeanalizowaæ plik szablonu
68 przy u¿yciu wyra¿eñ regularnych, aby znale¼æ wszystkie bloki i
69 zmienne; jest to "droga" operacja i nie jest konieczne wykonywanie jej
70 przy ka¿dym ¿±daniu strony - szablony rzadko zmieniaj± siê na stronach
71 produkcyjnych. St±d ta mo¿liwo¶æ: wewnêtrzna reprezentacja struktury
72 szablonu jest zapisywana do pliku i ten plik jest wczytywany zamiast
73 ¼ród³owego przy nastêpnych ¿±daniach (o ile nie zmieni³o siê ¼ród³o)
74 - testy oparte na PHPUnit do definiowania prawid³owego zachowania
75 - dostêpne przyk³ady u¿ycia do wiêkszo¶ci mo¿liwo¶ci, wystarczy
76 zajrzeæ do katalogu docs/.
78 Ta klasa ma w PEAR status: %{_status}.
81 Summary: Tests for PEAR::%{_pearname}
82 Summary(pl): Testy dla PEAR::%{_pearname}
83 Group: Development/Languages/PHP
84 Requires: %{name} = %{version}-%{release}
89 Tests for PEAR::%{_pearname}.
91 %description tests -l pl
92 Testy dla PEAR::%{_pearname}.
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{php_pear_dir}
100 %pear_package_install
103 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
108 %doc docs/%{_pearname}/docs/*
109 %{php_pear_dir}/.registry/*.reg
110 %{php_pear_dir}/%{_class}/%{_subclass}/*.php
113 %defattr(644,root,root,755)
114 %{php_pear_dir}/tests/*