X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=Smarty.spec;h=5ae22bc00063d29d840138b0be954a14913a9c99;hb=63fec6993f39e896b58b53dbba5729ac23d4019f;hp=d82a67457c8f2f83ec22eb30f64c7625a81f915c;hpb=76b23826b54eee16bc3894f91c25ea4b77588e35;p=packages%2FSmarty.git diff --git a/Smarty.spec b/Smarty.spec index d82a674..5ae22bc 100644 --- a/Smarty.spec +++ b/Smarty.spec @@ -1,23 +1,25 @@ -%define _doc_version 2.6.5 +%define _doc_version 2.6.11 %include /usr/lib/rpm/macros.php Summary: Template engine for PHP Summary(pl): System szablonów dla PHP Name: Smarty -Version: 2.6.6 -Release: 1 +Version: 2.6.14 +Release: 2 License: LGPL Group: Development/Languages/PHP Source0: http://smarty.php.net/distributions/%{name}-%{version}.tar.gz -# Source0-md5: ef46a28da54e51454aba882f7bc04052 +# Source0-md5: 9186796ddbc29191306338dea9d632a0 Source1: http://smarty.php.net/distributions/manual/en/%{name}-%{_doc_version}-docs.tar.gz -# Source1-md5: 724b8e508fd052654a2bd59615518cab +# Source1-md5: 7a0eaeda82eef073c87997141ee6207c +Source2: %{name}-function.html_input_image.php URL: http://smarty.php.net/ BuildRequires: rpm-php-pearprov >= 4.3 -Requires: php -Requires: php-pear +Requires: php-common BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define _smartydir %{_datadir}/php/Smarty + %description Smarty is a template engine for PHP. Smarty provides your basic variable substitution and dynamic block functionality, and also takes @@ -51,26 +53,45 @@ Dokumentacja do systemu szablon %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{name}/{internals,plugins} +install -d $RPM_BUILD_ROOT{%{_smartydir}/{internals,plugins},%{php_pear_dir}} + +install libs/{Config_File,Smarty{,_Compiler}}.class.php $RPM_BUILD_ROOT%{_smartydir} +install libs/debug.tpl $RPM_BUILD_ROOT%{_smartydir} +install libs/internals/*.php $RPM_BUILD_ROOT%{_smartydir}/internals +install libs/plugins/*.php $RPM_BUILD_ROOT%{_smartydir}/plugins +install %{SOURCE2} $RPM_BUILD_ROOT%{_smartydir}/plugins/function.html_input_image.php -install libs/{Config_File,Smarty{,_Compiler}}.class.php $RPM_BUILD_ROOT%{php_pear_dir}/%{name} -install libs/debug.tpl $RPM_BUILD_ROOT%{php_pear_dir}/%{name} -install libs/internals/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{name}/internals -install libs/plugins/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{name}/plugins +# backards compatible +ln -s %{_smartydir} $RPM_BUILD_ROOT%{php_pear_dir}/%{name} %clean rm -rf $RPM_BUILD_ROOT +# make compat symlink, the symlink is discarded using %ghost on package uninstall +%triggerpostun -- Smarty < 2.6.10-4 +if [ -d %{php_pear_dir}/%{name}/plugins ]; then + mv %{php_pear_dir}/%{name}/plugins/* %{_smartydir}/plugins + rmdir %{php_pear_dir}/%{name}/plugins 2>/dev/null +fi +rmdir %{php_pear_dir}/%{name} 2>/dev/null || mv -v %{php_pear_dir}/%{name}{,.rpmsave} +ln -s %{_smartydir} %{php_pear_dir}/%{name} + +%post +[ -e %{php_pear_dir}/%{name} ] || ln -s %{_smartydir} %{php_pear_dir}/%{name} + %files %defattr(644,root,root,755) %doc BUGS ChangeLog FAQ INSTALL NEWS README RELEASE_NOTES TODO -%dir %{php_pear_dir}/%{name} -%dir %{php_pear_dir}/%{name}/internals -%dir %{php_pear_dir}/%{name}/plugins -%{php_pear_dir}/%{name}/*.class.php -%{php_pear_dir}/%{name}/debug.tpl -%{php_pear_dir}/%{name}/internals/*.php -%{php_pear_dir}/%{name}/plugins/*.php +%dir %{_smartydir} +%dir %{_smartydir}/internals +%dir %{_smartydir}/plugins +%{_smartydir}/*.class.php +%{_smartydir}/debug.tpl +%{_smartydir}/internals/*.php +%{_smartydir}/plugins/*.php + +# for the sake of bc +%ghost %{php_pear_dir}/%{name} %files doc %defattr(644,root,root,755)