]>
Commit | Line | Data |
---|---|---|
48ef24da ER |
1 | %include /usr/lib/rpm/macros.php |
2 | %define php_min_version 5.2.1 | |
63723715 | 3 | Summary: Gettext support for Smarty |
924f14f7 | 4 | Summary(pl.UTF-8): Obsługa gettexta dla systemu Smarty |
48ef24da | 5 | Name: Smarty-plugin-gettext |
05d2ddd8 | 6 | Version: 1.1.0 |
bb17d5c2 | 7 | Release: 1 |
63723715 ER |
8 | License: LGPL v2+ |
9 | Group: Development/Languages/PHP | |
05d2ddd8 ER |
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 | |
ddf8fc27 | 13 | BuildRequires: rpm-php-pearprov |
63723715 ER |
14 | BuildRequires: sed >= 4.0 |
15 | Requires: Smarty >= 2.6.10-4 | |
1ea57013 | 16 | Requires: php(core) >= %{php_min_version} |
af38e0ab | 17 | Requires: php(gettext) |
bb17d5c2 | 18 | Requires: sed >= 4.0 |
48ef24da ER |
19 | Provides: smarty-gettext = %{version}-%{release} |
20 | Obsoletes: smarty-gettext | |
21 | Obsoletes: smarty-gettext-devel | |
63723715 ER |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
2e412f50 ER |
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 | |
63723715 ER |
30 | |
31 | %description | |
32 | smarty-gettext provides gettext support for Smarty, the popular PHP | |
33 | templating engine <http://smarty.php.net/>. | |
34 | ||
103be048 JR |
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/>. | |
6886e5dc | 38 | |
2fb1a223 ER |
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 | |
2fb1a223 ER |
43 | Requires: php(core) >= %{php_min_version} |
44 | Requires: php(gettext) | |
2e412f50 | 45 | Requires: php-Smarty >= 3.1.8-4 |
2fb1a223 ER |
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 | ||
63723715 | 55 | %prep |
bb17d5c2 ER |
56 | %setup -q -n smarty-gettext-%{version} |
57 | ||
58 | %{__sed} -i -e '1s,^#!.*php,#!/usr/bin/php,' tsmarty2c.php | |
63723715 ER |
59 | |
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
2fb1a223 | 62 | install -d $RPM_BUILD_ROOT{%{_smartyplugindir},%{_smarty3plugindir},%{_bindir}} |
2e412f50 ER |
63 | cp -p block.t.php $RPM_BUILD_ROOT%{_smartyplugindir} |
64 | cp -p block.t.php $RPM_BUILD_ROOT%{_smarty3plugindir} | |
bb17d5c2 | 65 | cp -p tsmarty2c.php $RPM_BUILD_ROOT%{_bindir}/tsmarty2c |
63723715 ER |
66 | |
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
bb17d5c2 | 72 | %doc README.md ChangeLog.md |
827d9419 | 73 | %attr(755,root,root) %{_bindir}/tsmarty2c |
48ef24da | 74 | %{_smartyplugindir}/*.php |
2fb1a223 ER |
75 | |
76 | %files -n php-Smarty-plugin-gettext | |
77 | %defattr(644,root,root,755) | |
bb17d5c2 | 78 | %doc README.md ChangeLog.md |
2fb1a223 ER |
79 | %attr(755,root,root) %{_bindir}/tsmarty2c |
80 | %{_smarty3plugindir}/*.php |