1 %define php_min_version 5.2.1
2 Summary: Gettext support for Smarty
3 Summary(pl.UTF-8): Obsługa gettexta dla systemu Smarty
4 Name: Smarty-plugin-gettext
8 Group: Development/Languages/PHP
9 Source0: https://github.com/smarty-gettext/smarty-gettext/archive/%{version}/smarty-gettext-%{version}.tar.gz
10 # Source0-md5: 2ef33831e5bd530967bbb7400d29787b
11 URL: https://github.com/smarty-gettext/smarty-gettext
12 BuildRequires: rpm-php-pearprov
13 BuildRequires: sed >= 4.0
14 Requires: Smarty >= 2.6.10-4
15 Requires: php(core) >= %{php_min_version}
16 Requires: php(gettext)
18 Provides: smarty-gettext = %{version}-%{release}
19 Obsoletes: smarty-gettext
20 Obsoletes: smarty-gettext-devel
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _smartyplugindir %{php_data_dir}/Smarty/plugins
25 %define _smarty3plugindir %{php_data_dir}/Smarty3/plugins
27 # tsmarty2c is deliberately packaged to both packages with same name
28 %define _duplicate_files_terminate_build 0
31 smarty-gettext provides gettext support for Smarty, the popular PHP
32 templating engine <http://smarty.php.net/>.
34 %description -l pl.UTF-8
35 smarty-gettext dodaje obsługę gettexta do systemu Smarty - popularnego
36 silnika szablonów dla PHP - <http://smarty.php.net/>.
38 %package -n php-Smarty-plugin-gettext
39 Summary: Gettext support for Smarty
40 Summary(pl.UTF-8): Obsługa gettexta dla systemu Smarty
41 Group: Development/Languages/PHP
42 Requires: php(core) >= %{php_min_version}
43 Requires: php(gettext)
44 Requires: php-Smarty >= 3.1.8-4
46 %description -n php-Smarty-plugin-gettext
47 smarty-gettext provides gettext support for Smarty, the popular PHP
48 templating engine <http://smarty.php.net/>.
50 %description -n php-Smarty-plugin-gettext -l pl.UTF-8
51 smarty-gettext dodaje obsługę gettexta do systemu Smarty - popularnego
52 silnika szablonów dla PHP - <http://smarty.php.net/>.
55 %setup -q -n smarty-gettext-%{version}
57 %{__sed} -i -e '1s,^#!.*php,#!/usr/bin/php,' tsmarty2c.php
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_smartyplugindir},%{_smarty3plugindir},%{_bindir}}
62 cp -p block.t.php $RPM_BUILD_ROOT%{_smartyplugindir}
63 cp -p block.t.php $RPM_BUILD_ROOT%{_smarty3plugindir}
64 cp -p tsmarty2c.php $RPM_BUILD_ROOT%{_bindir}/tsmarty2c
67 rm -rf $RPM_BUILD_ROOT
70 %defattr(644,root,root,755)
71 %doc README.md ChangeLog.md
72 %attr(755,root,root) %{_bindir}/tsmarty2c
73 %{_smartyplugindir}/*.php
75 %files -n php-Smarty-plugin-gettext
76 %defattr(644,root,root,755)
77 %doc README.md ChangeLog.md
78 %attr(755,root,root) %{_bindir}/tsmarty2c
79 %{_smarty3plugindir}/*.php