]> git.pld-linux.org Git - SPECS.git/blob - php-pecl-v8js.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / php-pecl-v8js.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         rel             2
6 %define         gitrev  e2a8186
7 %define         php_name        php%{?php_suffix}
8 %define         modname v8js
9 Summary:        V8 Javascript Engine for PHP
10 Name:           %{php_name}-pecl-%{modname}
11 Version:        0.1.5
12 Release:        %{rel}.%{gitrev}
13 License:        MIT
14 Group:          Development/Languages/PHP
15 Source0:        https://github.com/preillyme/v8js/archive/%{gitrev}/%{modname}-%{version}-%{gitrev}.tar.gz
16 # Source0-md5:  9faf1b76b2af2ab88102dc123a2a0bf1
17 URL:            http://pecl.php.net/package/v8js
18 BuildRequires:  %{php_name}-devel >= 4:5.3.3
19 BuildRequires:  rpmbuild(macros) >= 1.666
20 BuildRequires:  v8-devel >= 3.21.12
21 %{?requires_php_extension}
22 Provides:       php(%{modname}) = %{version}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This extension embeds the Google's V8 Javascript Engine into PHP.
27
28 %prep
29 %setup -qc
30 mv %{modname}-*/* .
31
32 %build
33 phpize
34 %configure
35 %{__make}
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
40
41 %{__make} install \
42         EXTENSION_DIR=%{php_extensiondir} \
43         INSTALL_ROOT=$RPM_BUILD_ROOT
44
45 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
46 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
47 ; Enable %{modname} extension module
48 extension=%{modname}.so
49 EOF
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %php_webserver_restart
56
57 %postun
58 if [ "$1" = 0 ]; then
59         %php_webserver_restart
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc README.md LICENSE CREDITS
65 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
66 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.166061 seconds and 3 git commands to generate.