+%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: 8
+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
Patch1: modifier.mb_truncate.patch
URL: http://www.smarty.net/
BuildRequires: rpm-php-pearprov >= 4.4.2-11
+Requires: php(core) >= %{php_min_version}
+Requires: php(date)
Requires: php(pcre)
Requires: php(tokenizer)
-Requires: php-common >= 4:%{php_min_version}
-Requires: php-date
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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