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