]>
Commit | Line | Data |
---|---|---|
c8ccde9a | 1 | %define doc_version 2.6.14 |
45b3a75d | 2 | %define php_min_version 5.0.0 |
8e2cfc78 | 3 | %include /usr/lib/rpm/macros.php |
0a03539f | 4 | Summary: Template engine for PHP |
554e6959 | 5 | Summary(pl.UTF-8): System szablonów dla PHP |
0a03539f | 6 | Name: Smarty |
948e0427 | 7 | Version: 2.6.26 |
beaf88d1 | 8 | Release: 2 |
0a03539f ŁJM |
9 | License: LGPL |
10 | Group: Development/Languages/PHP | |
de57fced | 11 | Source0: http://www.smarty.net/distributions/%{name}-%{version}.tar.gz |
948e0427 | 12 | # Source0-md5: e0da351443b8613e1013c481ab30cb84 |
c8ccde9a ER |
13 | # Source1Download: http://www.smarty.net/download-docs.php |
14 | Source1: http://www.smarty.net/distributions/manual/en/%{name}-%{doc_version}-docs.tar.gz | |
f89c557a | 15 | # Source1-md5: 5123152dd248898a84b96b806f551e78 |
ceb8190f | 16 | Source2: %{name}-function.html_input_image.php |
0b2b51c3 | 17 | URL: http://www.smarty.net/ |
45b3a75d ER |
18 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
19 | Requires: php-common >= 4:%{php_min_version} | |
20 | Requires: php-date | |
21 | Requires: php-pcre | |
22 | Requires: php-tokenizer | |
0a03539f ŁJM |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
0a03539f | 25 | |
45b3a75d | 26 | %define appdir %{php_data_dir}/Smarty |
88a9ca9a | 27 | |
0a03539f ŁJM |
28 | %description |
29 | Smarty is a template engine for PHP. Smarty provides your basic | |
30 | variable substitution and dynamic block functionality, and also takes | |
31 | a step further to be a "smart" template engine, adding features such | |
32 | as configuration files, template functions, variable modifiers, and | |
33 | making all of this functionality as easy as possible to use for both | |
34 | programmers and template designers. | |
35 | ||
b2a044db JR |
36 | %description -l pl.UTF-8 |
37 | Smarty jest systemem szablonów dla PHP. Pozwala na podstawowe | |
38 | podstawianie wartości zmiennych oraz dynamiczne operacje na blokach; | |
39 | idzie o krok dalej, aby być "mądrym" silnikiem szablonów, dodając | |
40 | takie możliwości jak pliki konfiguracyjne, funkcje, zmienne | |
41 | modyfikatory oraz czyniąc całą funkcjonalność jak najłatwiejszą w | |
42 | użyciu jednocześnie dla programistów i projektantów szablonów. | |
0a03539f | 43 | |
39e0217d | 44 | %package doc |
0a03539f | 45 | Summary: Template engine for PHP - documentation |
554e6959 | 46 | Summary(pl.UTF-8): System szablonów dla PHP - dokumentacja |
c8ccde9a | 47 | Version: %{doc_version} |
0a03539f ŁJM |
48 | Group: Development/Languages/PHP |
49 | ||
39e0217d | 50 | %description doc |
0a03539f ŁJM |
51 | Documentation for Smarty template engine. |
52 | ||
b2a044db JR |
53 | %description doc -l pl.UTF-8 |
54 | Dokumentacja do systemu szablonów Smarty. | |
0a03539f ŁJM |
55 | |
56 | %prep | |
45b3a75d | 57 | %setup -q -a1 |
0a03539f ŁJM |
58 | |
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
45b3a75d | 61 | install -d $RPM_BUILD_ROOT{%{appdir}/{internals,plugins},%{php_pear_dir}} |
88a9ca9a | 62 | |
45b3a75d ER |
63 | cp -a libs/{Config_File,Smarty{,_Compiler}}.class.php $RPM_BUILD_ROOT%{appdir} |
64 | cp -a libs/debug.tpl $RPM_BUILD_ROOT%{appdir} | |
65 | cp -a libs/internals/*.php $RPM_BUILD_ROOT%{appdir}/internals | |
66 | cp -a libs/plugins/*.php $RPM_BUILD_ROOT%{appdir}/plugins | |
67 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{appdir}/plugins/function.html_input_image.php | |
0a03539f | 68 | |
88a9ca9a | 69 | # backards compatible |
45b3a75d | 70 | ln -s %{appdir} $RPM_BUILD_ROOT%{php_pear_dir}/%{name} |
0a03539f ŁJM |
71 | |
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
88a9ca9a | 75 | # make compat symlink, the symlink is discarded using %ghost on package uninstall |
3e1a4945 | 76 | %triggerpostun -- Smarty < 2.6.10-4 |
88a9ca9a | 77 | if [ -d %{php_pear_dir}/%{name}/plugins ]; then |
45b3a75d | 78 | mv %{php_pear_dir}/%{name}/plugins/* %{appdir}/plugins |
88a9ca9a ER |
79 | rmdir %{php_pear_dir}/%{name}/plugins 2>/dev/null |
80 | fi | |
81 | rmdir %{php_pear_dir}/%{name} 2>/dev/null || mv -v %{php_pear_dir}/%{name}{,.rpmsave} | |
45b3a75d | 82 | ln -s %{appdir} %{php_pear_dir}/%{name} |
88a9ca9a | 83 | |
63fec699 | 84 | %post |
45b3a75d | 85 | [ -e %{php_pear_dir}/%{name} ] || ln -s %{appdir} %{php_pear_dir}/%{name} |
63fec699 | 86 | |
0a03539f ŁJM |
87 | %files |
88 | %defattr(644,root,root,755) | |
749d428c | 89 | %doc BUGS ChangeLog FAQ INSTALL NEWS README RELEASE_NOTES TODO |
45b3a75d ER |
90 | %dir %{appdir} |
91 | %dir %{appdir}/internals | |
92 | %dir %{appdir}/plugins | |
93 | %{appdir}/Config_File.class.php | |
94 | %{appdir}/Smarty.class.php | |
95 | %{appdir}/Smarty_Compiler.class.php | |
96 | %{appdir}/debug.tpl | |
97 | %{appdir}/internals/*.php | |
98 | %{appdir}/plugins/*.php | |
99 | ||
100 | # for the sake of bc when installed to pear dir | |
88a9ca9a | 101 | %ghost %{php_pear_dir}/%{name} |
0a03539f | 102 | |
39e0217d | 103 | %files doc |
0a03539f ŁJM |
104 | %defattr(644,root,root,755) |
105 | %doc manual/* |