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