X-Git-Url: https://git.pld-linux.org/?p=packages%2Fphp-pear-HTML_Template_Flexy.git;a=blobdiff_plain;f=php-pear-HTML_Template_Flexy.spec;h=a3fd9ab5a863adcb39e8223e8a4d75a2afd994ba;hp=09da9455187ba30ddc9f87008603229f46c5bb21;hb=HEAD;hpb=01596fea5bf3ffcf8f6d9c79c6a94241668751f2 diff --git a/php-pear-HTML_Template_Flexy.spec b/php-pear-HTML_Template_Flexy.spec index 09da945..a3fd9ab 100644 --- a/php-pear-HTML_Template_Flexy.spec +++ b/php-pear-HTML_Template_Flexy.spec @@ -1,111 +1,133 @@ -%include /usr/lib/rpm/macros.php -%define _class HTML -%define _subclass Template -%define _status stable -%define _pearname %{_class}_%{_subclass}_Flexy - -Summary: %{_pearname} - a flexible caching template engine based on SimpleTemplate -Summary(pl): %{_pearname} - elastyczny buforuj±cy silnik szablonów oparty na SimpleTemplate -Name: php-pear-%{_pearname} -Version: 1.0.1 +%define status stable +%define pearname HTML_Template_Flexy +Summary: %{pearname} - a flexible caching template engine based on SimpleTemplate +Summary(pl.UTF-8): %{pearname} - elastyczny buforujący silnik szablonów oparty na SimpleTemplate +Name: php-pear-%{pearname} +Version: 1.3.13 Release: 1 License: PHP 2.02 Group: Development/Languages/PHP -Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz -# Source0-md5: ac684af4c1f06230f6c261a6bbd2c262 +Source0: http://pear.php.net/get/%{pearname}-%{version}.tgz +# Source0-md5: b2927f235ba75660dcc0f3a6257279d1 Patch0: %{name}-case_fix.patch +Patch1: %{name}-path_fix.patch +Patch2: %{name}-no_gtk.patch URL: http://pear.php.net/package/HTML_Template_Flexy/ -BuildRequires: rpm-php-pearprov >= 4.0.2-98 +BuildRequires: php-pear-PEAR +BuildRequires: rpm-php-pearprov >= 4.4.2-11 +BuildRequires: rpmbuild(macros) >= 1.654 +Requires: php(core) >= 4.3 Requires: php-pear +Suggests: php-pear-File_Gettext +Suggests: php-pear-HTML_Javascript +Suggests: php-pear-Translation2 +Obsoletes: php-pear-HTML_Template_Flexy-tests BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +# exclude optional dependencies +%define _noautoreq_pear HTML/Javascript.* File/Gettext.* Translation2.* Services/JSON.php + %description -HTML_Template_Flexy started it's life as a simplification of HTML_Template_Xipe, -however in Version 0.2, It became one of the first template engine to use a real Lexer, -rather than regex'es, making it possible to do things like ASP.net or Cold Fusion tags. -However, it still has a very simple set of goals. +HTML_Template_Flexy started its life as a simplification of +HTML_Template_Xipe, however in version 0.2, it became one of the first +template engine to use a real Lexer, rather than regexes, making it +possible to do things like ASP.net or Cold Fusion tags. However, it +still has a very simple set of goals. - Very Simple API, - o easy to learn... - o prevents to much logic going in templates -- Easy to write document'able code - o By using object vars for a template rather than 'assign', you - can use PHPDoc comments to list what variable you use. + - easy to learn... + - prevents to much logic going in templates +- Easy to write documentable code + - By using object vars for a template rather than 'assign', you can + use PHPDoc comments to list what variable you use. - Editable in WYSIWYG editors - o you can create full featured templates, that doesnt get broken every time you edit with - Dreamweaver(tm) or Mozzila editor - o Uses namespaced attributes to add looping/conditionals -- Extremely Fast, - o runtime is at least 4 time smaller than most other template engines (eg. Smarty) - o uses compiled templates, as a result it is many times faster on blocks and loops than - than Regex templates (eg. IT/phplib) -- Safer (for cross site scripting attacks) - o All variables default to be output as HTML escaped (overridden with the :h modifier) + - you can create full featured templates, that don't get broken every + time you edit with Dreamweaver(tm) or Mozilla editor + - Uses namespaced attributes to add looping/conditionals +- Extremely Fast + - runtime is at least 4 time smaller than most other template engines + (eg. Smarty) + - uses compiled templates, as a result it is many times faster on + blocks and loops than than Regex templates (eg. IT/phplib) +- Safer (for cross-site scripting attacks) + - All variables default to be output as HTML escaped (overridden with + the :h modifier) - Multilanguage support - o Parses strings out of template, so you can build translation tools - o Compiles language specific templates (so translation is only done once, not on every request) -- Full dynamic element support (like ASP.NET), so you can pick elements to replace at runtime - -Features: -- {variable} to echo $object->variable -- {method()} to echo $object->method(); -- {foreach:var,key,value} to PHP foreach loops -- tag attributes FLEXY:FOREACH, FLEXY:IF for looping and conditional HTML inclusion -- {if:variable} to PHP If statement -- {if:method()} to PHP If statement -- {else:} and {end:} to close or alternate If statements -- FORM to HTML_Template_Flexy_Element's -- replacement of INPUT, TEXTAREA and SELECT tags with HTML_Template_Flexy_Element code - use FLEXY:IGNORE (inherited) and FLEXY:IGNOREONLY (single) to prevent replacements -- FLEXY:START/FLEXY:STARTCHILDREN tags to define where template starts/finishes -- support for urlencoded braces {} in HTML attributes. -- documentation in the pear manual + - Parses strings out of template, so you can build translation tools + - Compiles language specific templates (so translation is only done + once, not on every request) +- Full dynamic element support (like ASP.NET), so you can pick + elements to replace at runtime -- examples at http://cvs.php.net/cvs.php/pear/HTML_Template_Flexy/tests/ +The long term plan for Flexy is to be integrated as a backend for the +Future Template Package (A BC wrapper will be made available - as the +author needs to use it too). -The long term plan for Flexy is to be integrated as a backend for the Future -Template Package (A BC wrapper will be made available - as I need to use it -too!) +In PEAR status of this package is: %{status}. -In PEAR status of this package is: %{_status}. +%description -l pl.UTF-8 +HTML_Template_Flexy początkowo był uproszczeniem HTML_Template_Xipe, +jednak od wersji 0.2 stał się jednym z pierwszych silników szablonów +używających prawdziwego analizatora leksykalnego zamiast wyrażeń +regularnych, co umożliwia robienie rzeczy w stylu ASP.net czy +znaczników Cold Fusion. Jednak nadal ma bardzo prosty zbiór +zastosowań. Cechy silnika: +- bardzo proste API - łatwe do nauczenia, zapobiega umieszczaniu zbyt + dużej ilości logiki w szablonach +- łatwe pisanie dokumentowalnego kodu - poprzez użycie zmiennych + obiektowych dla szablonu zamiast przypisywania można używać komentarzy + phpDoc do wypisywania używanych zmiennych +- edytowalny w edytorach WYSIWYG - można tworzyć w pełni funkcjonalne + szablony, które nie psują się po każdym użyciu Dreamweavera(tm) czy + edytora Mozilli; przy dodawaniu pętli i warunków używane są atrybuty z + przestrzeniami nazw +- ekstremalnie szybki - kod uruchomieniowy jest przynajmniej 4 razy + mniejszy niż większość innych silników szablonów (np. Smarty); używa + skompilowanych szablonów, dzięki czemu jest wiele razy szybszy na + blokach i pętlach niż szablony oparte na wyrażeniach regularnych (np. + IT/phplib) +- bezpieczniejszy (pod kątem ataków cross-site scripting) - wszystkie + zmienne domyślnie są wypisywane z użyciem sekwencji kontrolnych HTML + (można to zmienić modyfikatorem :h) +- wspiera wielojęzyczność - przetwarza łańcuchy z szablonu, co pozwala + na zbudowanie narzędzi do tłumaczenia; kompiluje specyficzne dla + języka szablony, dzięki czemu tłumaczenie jest robione tylko raz, a + nie przy każdym żądaniu +- w pełni obsługuje dynamiczne elementy (jak ASP.NET), dzięki czemu + można pobierać elementy do zastąpienia w czasie działania. -%description -l pl -Flexy Template to silnik szablonów do konwertera kodu PHP, oparty na -Simple Template i podobny do Smarty. Powinien byæ bardzo szybki, jest -³atwy w rozszerzaniu, rozwijaniu i u¿ywaniu dowolnej sk³adni -szablonów. Domy¶lny filtr (SimpleTags) zawiera: zmienne, pêtle -foreach, warunki, wywo³ania metod, w³±czanie kodu, obs³uguje znaczniki -zakodowane w URL-ach - wiêc mo¿e modyfikowaæ szablony w Mozilli itp. -Inne filtry to: - - RtfSimpletags - do tworzenia dokumentów RTF dla Worda, - - BodyOnly - wycinaj±cy nag³ówek i stopkê z szablonu, - - Php - wycinaj±cy kod PHP z szablonu, - - Email - do przetwarzania szablonów e-mail. +Długoterminowym planem rozwoju Flexy jest zintegrowanie jako backend +dla Future Template Package (dostępny będzie wrapper BC, jako że autor +też musi tego używać). -Ta klasa ma w PEAR status: %{_status}. +Ta klasa ma w PEAR status: %{status}. %prep -%setup -q -c -cd %{_pearname}-%{version} +%pear_package_setup +cd ./%{php_pear_dir}/HTML/Template %patch0 -p1 +%patch1 -p1 +%patch2 -p6 +cd - + +mv .%{php_pear_dir}/data/HTML_Template_Flexy/TODO . +mv .%{php_pear_dir}/data/HTML_Template_Flexy/ChangeLog . %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/{Compiler/{Flexy,Standard,Regex},Token} - -install %{_pearname}-%{version}/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass} -install %{_pearname}-%{version}/Flexy/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy -install %{_pearname}-%{version}/Flexy/Compiler/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler -install %{_pearname}-%{version}/Flexy/Compiler/Flexy/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Flexy -install %{_pearname}-%{version}/Flexy/Compiler/Standard/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Standard -install %{_pearname}-%{version}/Flexy/Compiler/Regex/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Compiler/Regex -install %{_pearname}-%{version}/Flexy/Token/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Flexy/Token +install -d $RPM_BUILD_ROOT%{php_pear_dir} +%pear_package_install + +%post -p +%pear_package_print_optionalpackages %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc %{_pearname}-%{version}/{Flexy/example.ini,tests} -%{php_pear_dir}/%{_class}/%{_subclass}/Flexy -%{php_pear_dir}/%{_class}/%{_subclass}/Flexy.php +%doc TODO ChangeLog install.log optional-packages.txt +%{php_pear_dir}/.registry/*.reg +%{php_pear_dir}/HTML/Template/Flexy +%{php_pear_dir}/HTML/Template/Flexy.php +%{php_pear_dir}/data/%{pearname}