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