up to 1.1.0; updated URL
[packages/Smarty-plugin-gettext.git] / Smarty-plugin-gettext.spec
1 %include        /usr/lib/rpm/macros.php
2 %define         php_min_version 5.2.1
3 Summary:        Gettext support for Smarty
4 Summary(pl.UTF-8):      Obsługa gettexta dla systemu Smarty
5 Name:           Smarty-plugin-gettext
6 Version:        1.1.0
7 Release:        1
8 License:        LGPL v2+
9 Group:          Development/Languages/PHP
10 Source0:        https://github.com/smarty-gettext/smarty-gettext/archive/%{version}/smarty-gettext-%{version}.tar.gz
11 # Source0-md5:  ea0728f159d2c3cf42f62156fd9c4ef7
12 URL:            https://github.com/smarty-gettext/smarty-gettext
13 BuildRequires:  rpm-php-pearprov
14 BuildRequires:  sed >= 4.0
15 Requires:       Smarty >= 2.6.10-4
16 Requires:       php(core) >= %{php_min_version}
17 Requires:       php(gettext)
18 Requires:       sed >= 4.0
19 Provides:       smarty-gettext = %{version}-%{release}
20 Obsoletes:      smarty-gettext
21 Obsoletes:      smarty-gettext-devel
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _smartyplugindir        %{php_data_dir}/Smarty/plugins
26 %define         _smarty3plugindir       %{php_data_dir}/Smarty3/plugins
27
28 # tsmarty2c is deliberately packaged to both packages with same name
29 %define         _duplicate_files_terminate_build   0
30
31 %description
32 smarty-gettext provides gettext support for Smarty, the popular PHP
33 templating engine <http://smarty.php.net/>.
34
35 %description -l pl.UTF-8
36 smarty-gettext dodaje obsługę gettexta do systemu Smarty - popularnego
37 silnika szablonów dla PHP - <http://smarty.php.net/>.
38
39 %package -n php-Smarty-plugin-gettext
40 Summary:        Gettext support for Smarty
41 Summary(pl.UTF-8):      Obsługa gettexta dla systemu Smarty
42 Group:          Development/Languages/PHP
43 Requires:       php(core) >= %{php_min_version}
44 Requires:       php(gettext)
45 Requires:       php-Smarty >= 3.1.8-4
46
47 %description -n php-Smarty-plugin-gettext
48 smarty-gettext provides gettext support for Smarty, the popular PHP
49 templating engine <http://smarty.php.net/>.
50
51 %description -n php-Smarty-plugin-gettext -l pl.UTF-8
52 smarty-gettext dodaje obsługę gettexta do systemu Smarty - popularnego
53 silnika szablonów dla PHP - <http://smarty.php.net/>.
54
55 %prep
56 %setup -q -n smarty-gettext-%{version}
57
58 %{__sed} -i -e '1s,^#!.*php,#!/usr/bin/php,' tsmarty2c.php
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_smartyplugindir},%{_smarty3plugindir},%{_bindir}}
63 cp -p block.t.php $RPM_BUILD_ROOT%{_smartyplugindir}
64 cp -p block.t.php $RPM_BUILD_ROOT%{_smarty3plugindir}
65 cp -p tsmarty2c.php $RPM_BUILD_ROOT%{_bindir}/tsmarty2c
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README.md ChangeLog.md
73 %attr(755,root,root) %{_bindir}/tsmarty2c
74 %{_smartyplugindir}/*.php
75
76 %files -n php-Smarty-plugin-gettext
77 %defattr(644,root,root,755)
78 %doc README.md ChangeLog.md
79 %attr(755,root,root) %{_bindir}/tsmarty2c
80 %{_smarty3plugindir}/*.php
This page took 0.059985 seconds and 3 git commands to generate.