[packages/php-pgettext] new
glen
glen at pld-linux.org
Mon Sep 1 13:45:13 CEST 2014
commit 5b17139386ffd1399c167a151e2201d03eaaa1fb
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Sep 1 14:44:44 2014 +0300
new
php-pgettext.spec | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
---
diff --git a/php-pgettext.spec b/php-pgettext.spec
new file mode 100644
index 0000000..6fb9633
--- /dev/null
+++ b/php-pgettext.spec
@@ -0,0 +1,50 @@
+%define pkgname pgettext
+%define php_min_version 4.2.0
+%include /usr/lib/rpm/macros.php
+Summary: pgettext wrapper for php gettext
+Name: php-%{pkgname}
+Version: 0.1
+Release: 1
+# assume MIT https://github.com/azatoth/php-pgettext/pull/1
+License: MIT
+Group: Development/Languages/PHP
+Source0: https://github.com/azatoth/php-pgettext/archive/master/%{name}-%{version}.tar.gz
+# Source0-md5: 1b388f9379954a0156aeb7b9d322c38d
+URL: https://github.com/azatoth/php-pgettext
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
+BuildRequires: rpmbuild(macros) >= 1.461
+Requires: php(core) >= %{php_min_version}
+Requires: php(gettext)
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Default installation of gettext in PHP lacks support for pgettext et
+al. This PHP script adds support for those, as well as an gettext_noop
+wrapper.
+
+Following functions are exported:
+- pgettext($msg_ctxt, $msgid)
+- dpgettext($domain, $msg_ctxt, $msgid)
+- dcpgettext($domain, $msg_ctxt, $msgid, $category)
+- npgettext($msg_ctxt, $msgid, $msgid_plural, $n)
+- dnpgettext($domain, $msg_ctxt, $msgid, $msgid_plural, $n)
+- dcnpgettext($domain, $msg_ctxt, $msgid, $msgid_plural, $n, $category)
+- gettext_noop($msgid)
+
+%prep
+%setup -qc
+mv %{name}-*/* .
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{php_data_dir}
+cp -p pgettext.php $RPM_BUILD_ROOT%{php_data_dir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%{php_data_dir}/pgettext.php
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pgettext.git/commitdiff/5b17139386ffd1399c167a151e2201d03eaaa1fb
More information about the pld-cvs-commit
mailing list