X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=Smarty-plugin-gettext.spec;h=c3135a68a659dc8ad72ea64d472e6dc67a8bb7c4;hb=2fb1a22323d1e68fc9f3d57483e97c83de20e2eb;hp=84ff3eda9ae7c3f0faa3f982835a9ddeb9db5cc2;hpb=924f14f7526a8a25dc474f953341b66c64573e61;p=packages%2FSmarty-plugin-gettext.git
diff --git a/Smarty-plugin-gettext.spec b/Smarty-plugin-gettext.spec
index 84ff3ed..c3135a6 100644
--- a/Smarty-plugin-gettext.spec
+++ b/Smarty-plugin-gettext.spec
@@ -1,23 +1,32 @@
-%define _beta b1
-%define _rel 3
+%define subver b1
+%define rel 12
+%include /usr/lib/rpm/macros.php
+%define php_min_version 5.2.1
Summary: Gettext support for Smarty
Summary(pl.UTF-8): ObsÅuga gettexta dla systemu Smarty
-Name: smarty-gettext
+Name: Smarty-plugin-gettext
Version: 1.0
-Release: 0.%{_beta}.%{_rel}
+Release: 0.%{subver}.%{rel}
License: LGPL v2+
Group: Development/Languages/PHP
-Source0: http://dl.sourceforge.net/smarty-gettext/%{name}-%{version}%{_beta}.tgz
+Source0: http://downloads.sourceforge.net/smarty-gettext/smarty-gettext-%{version}%{subver}.tgz
# Source0-md5: 3795d4ce1a391e8eace9bd2adb5b1abb
+Source1: http://bazaar.launchpad.net/~eventum-developers/eventum/trunk/download/head%3A/tsmarty2c-20091105141507-sh36mrwjgo63hzxk-1/tsmarty2c
+# Source1-md5: 589fd057a8dec5ee9796849885bb93c4
URL: http://smarty.incutio.com/?page=SmartyGettext
+BuildRequires: rpm-php-pearprov
BuildRequires: sed >= 4.0
Requires: Smarty >= 2.6.10-4
+Requires: php(core) >= %{php_min_version}
Requires: php(gettext)
-Requires: php-common
+Provides: smarty-gettext = %{version}-%{release}
+Obsoletes: smarty-gettext
+Obsoletes: smarty-gettext-devel
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _smartyplugindir %{_datadir}/php/Smarty/plugins
+%define _smarty3plugindir %{_datadir}/php/Smarty3/plugins
%description
smarty-gettext provides gettext support for Smarty, the popular PHP
@@ -27,30 +36,31 @@ templating engine .
smarty-gettext dodaje obsÅugÄ gettexta do systemu Smarty - popularnego
silnika szablonów dla PHP - .
-%package devel
-Summary: Development tools for smarty-gettext
-Summary(pl.UTF-8): NarzÄdzia programistyczne dla pakietu smarty-gettext
-Group: Development
-# does not require base
+%package -n php-Smarty-plugin-gettext
+Summary: Gettext support for Smarty
+Summary(pl.UTF-8): ObsÅuga gettexta dla systemu Smarty
+Group: Development/Languages/PHP
+Requires: php-Smarty >= 3.1.8-4
+Requires: php(core) >= %{php_min_version}
+Requires: php(gettext)
-%description devel
-This package contains tsmarty2c program which can be used to extract
-gettext compatible strings.
+%description -n php-Smarty-plugin-gettext
+smarty-gettext provides gettext support for Smarty, the popular PHP
+templating engine .
-%description devel -l pl.UTF-8
-Ten pakiet zawiera program tsmarty2c, którego można użyÄ do wyciÄ
gania
-ÅaÅcuchów kompatybilnych z gettextem.
+%description -n php-Smarty-plugin-gettext -l pl.UTF-8
+smarty-gettext dodaje obsÅugÄ gettexta do systemu Smarty - popularnego
+silnika szablonów dla PHP - .
%prep
-%setup -q -n %{name}-%{version}%{_beta}
-%{__sed} -i -e '1s,#!.*php,#!%{_bindir}/php,' tsmarty2c.php
+%setup -q -n smarty-gettext-%{version}%{subver}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_smartyplugindir},%{_bindir}}
-
-install block.t.php $RPM_BUILD_ROOT%{_smartyplugindir}
-install tsmarty2c.php $RPM_BUILD_ROOT%{_bindir}/tsmarty2c
+install -d $RPM_BUILD_ROOT{%{_smartyplugindir},%{_smarty3plugindir},%{_bindir}}
+cp -a block.t.php $RPM_BUILD_ROOT%{_smartyplugindir}
+cp -a block.t.php $RPM_BUILD_ROOT%{_smarty3plugindir}
+install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/tsmarty2c
%clean
rm -rf $RPM_BUILD_ROOT
@@ -58,8 +68,11 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc ChangeLog README
+%attr(755,root,root) %{_bindir}/tsmarty2c
%{_smartyplugindir}/*.php
-%files devel
+%files -n php-Smarty-plugin-gettext
%defattr(644,root,root,755)
+%doc ChangeLog README
%attr(755,root,root) %{_bindir}/tsmarty2c
+%{_smarty3plugindir}/*.php