File php5-pecl-v8js.spec of Package php5-pecl-v8js
#
# spec file for package php5-pecl-v8js
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Thomas Worm <thomas.worm@thomas-worm.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: php5-pecl-v8js
Version: 0.1.3
Release: 0
Summary: V8 Javascript Engine for PHP
Group: Development/Libraries/PHP
License: PHP-3.0
URL: http://pecl.php.net/package/v8js
Source0: http://pecl.php.net/get/v8js-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: php5 php5-devel v8 v8-devel libtool gcc gcc-c++
Requires: php5 v8
# BuildArch: noarch
%define extension_dir %{_libdir}/php5/extensions
%define php_sysconf %{_sysconfdir}/php5
%define extension_name v8js
%description
This extension embeds the Google's V8 Javascript Engine into PHP.
%prep
%setup -q -n %{extension_name}-%{version}
%build
%{_bindir}/phpize
%configure --with-%{extension_name}
%{__make}
%check
%install
%{__make} install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{php_sysconf}/conf.d
echo "; comment out next line to disable %{extension_name} extension in php" > %{buildroot}%{php_sysconf}/conf.d/%{extension_name}.ini
echo "extension=%{extension_name}.so" >> %{buildroot}%{php_sysconf}/conf.d/%{extension_name}.ini
%clean
rm -rf %{buildroot}
%files
%defattr(644,root,root,755)
%{extension_dir}/%{extension_name}.so
%config(noreplace) %{php_sysconf}/conf.d/%{extension_name}.ini
%changelog