[packages/php-pecl-spidermonkey] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:26:52 CEST 2013
commit fda7fa7370a12f9d1ee900044d3cd83663dad36d
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:41 2013 +0300
support building for multiple php versions
php-pecl-spidermonkey.spec | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/php-pecl-spidermonkey.spec b/php-pecl-spidermonkey.spec
index 2ce7eb4..d911759 100644
--- a/php-pecl-spidermonkey.spec
+++ b/php-pecl-spidermonkey.spec
@@ -1,42 +1,43 @@
-%define _modname spidermonkey
-%define _status stable
-Summary: %{_modname} - Spidermonkey JavaScript engine for PHP
-Summary(pl.UTF-8): %{_modname} - silnik JavaScript Spidermonkey dla PHP
-Name: php-pecl-%{_modname}
+%define php_name php%{?php_suffix}
+%define modname spidermonkey
+%define status stable
+Summary: %{modname} - Spidermonkey JavaScript engine for PHP
+Summary(pl.UTF-8): %{modname} - silnik JavaScript Spidermonkey dla PHP
+Name: %{php_name}-pecl-%{modname}
Version: 1.0.0
Release: 2
License: PHP 3.01
Group: Development/Languages/PHP
-Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: 1a7a4043fa6c86bb7e3cb24e794c284b
Patch0: lib64.patch
-URL: http://pecl.php.net/package/%{_modname}/
+URL: http://pecl.php.net/package/spidermonkey
BuildRequires: js185-devel
-BuildRequires: php-devel >= 4:5.3.0
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: %{php_name}-devel >= 4:5.3.0
+BuildRequires: rpmbuild(macros) >= 1.650
%{?requires_php_extension}
Requires: php(core) >= 5.3.0
-Obsoletes: php-pear-%{_modname}
+Obsoletes: php-pear-%{modname}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This extension allow you to embed Mozilla's Javascript engine
Spidermonkey in PHP.
-In PECL status of this package is: %{_status}.
+In PECL status of this package is: %{status}.
%description -l pl.UTF-8
To rozszerzenie pozwala na osadzanie w PHP silnika Javascript Mozilli
- Spidermonkey.
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
%prep
%setup -q -c
%ifarch %{x8664}
%patch0 -p1
%endif
-mv %{_modname}-%{version}/* .
+mv %{modname}-%{version}/* .
%build
# libtool 2.2 build fix
@@ -55,10 +56,10 @@ phpize
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
-install modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+install modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
EOF
%clean
@@ -74,5 +75,5 @@ fi
%files
%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-spidermonkey.git/commitdiff/fda7fa7370a12f9d1ee900044d3cd83663dad36d
More information about the pld-cvs-commit
mailing list