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