]> git.pld-linux.org Git - packages/Smarty.git/blobdiff - Smarty.spec
up to 2.6.31, php7.2 compat
[packages/Smarty.git] / Smarty.spec
index 0b71de5056d52a59ebe825cdce75f92e55e2e8c7..2ee8780eca3d67d5ea5e19f133debf915c32422d 100644 (file)
@@ -1,25 +1,28 @@
+%define                main_version    2.6.31
 %define                doc_version     2.6.14
 %define                php_min_version 5.0.0
 %include       /usr/lib/rpm/macros.php
 Summary:       Template engine for PHP
 Summary(pl.UTF-8):     System szablonów dla PHP
 Name:          Smarty
-Version:       2.6.26
-Release:       2
-License:       LGPL
+Version:       %{main_version}
+Release:       1
+License:       LGPL v2.1+
 Group:         Development/Languages/PHP
-Source0:       http://www.smarty.net/distributions/%{name}-%{version}.tar.gz
-# Source0-md5: e0da351443b8613e1013c481ab30cb84
+Source0:       https://github.com/smarty-php/smarty/archive/v%{version}/smarty-%{version}.tar.gz
+# Source0-md5: 49f8c7f60d2c551589f937082a7faaa5
 # Source1Download: http://www.smarty.net/download-docs.php
 Source1:       http://www.smarty.net/distributions/manual/en/%{name}-%{doc_version}-docs.tar.gz
 # Source1-md5: 5123152dd248898a84b96b806f551e78
 Source2:       %{name}-function.html_input_image.php
+Patch0:                path.patch
+Patch1:                modifier.mb_truncate.patch
 URL:           http://www.smarty.net/
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
-Requires:      php-common >= 4:%{php_min_version}
-Requires:      php-date
-Requires:      php-pcre
-Requires:      php-tokenizer
+Requires:      php(core) >= %{php_min_version}
+Requires:      php(date)
+Requires:      php(pcre)
+Requires:      php(tokenizer)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -54,21 +57,28 @@ Documentation for Smarty template engine.
 Dokumentacja do systemu szablonów Smarty.
 
 %prep
-%setup -q -a1
+%setup -qn smarty-%{main_version} -a1
+%patch0 -p1
+cp -a libs/plugins/modifier.{,mb_}truncate.php
+%patch1 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{appdir}/{internals,plugins},%{php_pear_dir}}
 
-cp -a libs/{Config_File,Smarty{,_Compiler}}.class.php $RPM_BUILD_ROOT%{appdir}
+cp -a libs/Smarty.class.php $RPM_BUILD_ROOT%{php_data_dir}
+cp -a libs/{Config_File,Smarty_Compiler}.class.php $RPM_BUILD_ROOT%{appdir}
 cp -a libs/debug.tpl $RPM_BUILD_ROOT%{appdir}
 cp -a libs/internals/*.php $RPM_BUILD_ROOT%{appdir}/internals
 cp -a libs/plugins/*.php $RPM_BUILD_ROOT%{appdir}/plugins
 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{appdir}/plugins/function.html_input_image.php
 
-# backards compatible
+# backards compatible with pear dir
 ln -s %{appdir} $RPM_BUILD_ROOT%{php_pear_dir}/%{name}
 
+# backards compatible with entry point in subdir
+ln -s ../Smarty.class.php $RPM_BUILD_ROOT%{appdir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -87,11 +97,15 @@ ln -s %{appdir} %{php_pear_dir}/%{name}
 %files
 %defattr(644,root,root,755)
 %doc BUGS ChangeLog FAQ INSTALL NEWS README RELEASE_NOTES TODO
+# entry point in include_path
+%{php_data_dir}/Smarty.class.php
+
+# app itself
 %dir %{appdir}
 %dir %{appdir}/internals
 %dir %{appdir}/plugins
-%{appdir}/Config_File.class.php
 %{appdir}/Smarty.class.php
+%{appdir}/Config_File.class.php
 %{appdir}/Smarty_Compiler.class.php
 %{appdir}/debug.tpl
 %{appdir}/internals/*.php
This page took 0.069223 seconds and 4 git commands to generate.