]> git.pld-linux.org Git - SPECS.git/blob - php-pecl-spidermonkey.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / php-pecl-spidermonkey.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname spidermonkey
3 %define         status          stable
4 Summary:        %{modname} - Spidermonkey JavaScript engine for PHP
5 Summary(pl.UTF-8):      %{modname} - silnik JavaScript Spidermonkey dla PHP
6 Name:           %{php_name}-pecl-%{modname}
7 Version:        1.0.0
8 Release:        6
9 License:        PHP 3.01
10 Group:          Development/Languages/PHP
11 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
12 # Source0-md5:  1a7a4043fa6c86bb7e3cb24e794c284b
13 Patch0:         lib64.patch
14 Patch1:         libx32.patch
15 Patch2:         js187.patch
16 URL:            http://pecl.php.net/package/spidermonkey
17 BuildRequires:  %{php_name}-devel >= 4:5.3.0
18 BuildRequires:  js187-devel
19 BuildRequires:  rpmbuild(macros) >= 1.650
20 %{?requires_php_extension}
21 Provides:       php(%{modname}) = %{version}
22 Obsoletes:      php-pecl-spidermonkey < 1.0.0-4
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This extension allow you to embed Mozilla's Javascript engine
27 Spidermonkey in PHP.
28
29 In PECL status of this package is: %{status}.
30
31 %description -l pl.UTF-8
32 To rozszerzenie pozwala na osadzanie w PHP silnika Javascript Mozilli
33 - Spidermonkey.
34
35 To rozszerzenie ma w PECL status: %{status}.
36
37 %prep
38 %setup -q -c
39 %ifarch %{x8664}
40 %patch0 -p1
41 %endif
42 %ifarch x32
43 %patch1 -p1
44 %endif
45 %patch2 -p1
46 mv %{modname}-%{version}/* .
47
48 %build
49 # libtool 2.2 build fix
50 if [ -f '%{_aclocaldir}/ltsugar.m4' ]; then
51         cat "%{_aclocaldir}/ltsugar.m4" >> "config.m4"
52         cat "%{_aclocaldir}/ltversion.m4" >> "config.m4"
53         cat "%{_aclocaldir}/lt~obsolete.m4" >> "config.m4"
54         cat "%{_aclocaldir}/ltoptions.m4" >> "config.m4"
55 fi
56
57 phpize
58 %configure
59 %{__make}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
64
65 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
66 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
67 ; Enable %{modname} extension module
68 extension=%{modname}.so
69 EOF
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
75 %php_webserver_restart
76
77 %postun
78 if [ "$1" = 0 ]; then
79         %php_webserver_restart
80 fi
81
82 %files
83 %defattr(644,root,root,755)
84 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
85 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.037121 seconds and 3 git commands to generate.