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