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