]> git.pld-linux.org Git - packages/php-pecl-spidermonkey.git/blob - php-pecl-spidermonkey.spec
support building for multiple php versions
[packages/php-pecl-spidermonkey.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:        2
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 URL:            http://pecl.php.net/package/spidermonkey
15 BuildRequires:  js185-devel
16 BuildRequires:  %{php_name}-devel >= 4:5.3.0
17 BuildRequires:  rpmbuild(macros) >= 1.650
18 %{?requires_php_extension}
19 Requires:       php(core) >= 5.3.0
20 Obsoletes:      php-pear-%{modname}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 This extension allow you to embed Mozilla's Javascript engine
25 Spidermonkey in PHP.
26
27 In PECL status of this package is: %{status}.
28
29 %description -l pl.UTF-8
30 To rozszerzenie pozwala na osadzanie w PHP silnika Javascript Mozilli
31 - Spidermonkey.
32
33 To rozszerzenie ma w PECL status: %{status}.
34
35 %prep
36 %setup -q -c
37 %ifarch %{x8664}
38 %patch0 -p1
39 %endif
40 mv %{modname}-%{version}/* .
41
42 %build
43 # libtool 2.2 build fix
44 if [ -f '%{_aclocaldir}/ltsugar.m4' ]; then
45         cat "%{_aclocaldir}/ltsugar.m4" >> "config.m4"
46         cat "%{_aclocaldir}/ltversion.m4" >> "config.m4"
47         cat "%{_aclocaldir}/lt~obsolete.m4" >> "config.m4"
48         cat "%{_aclocaldir}/ltoptions.m4" >> "config.m4"
49 fi
50
51 phpize
52 %configure
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
58
59 install modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
60 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
61 ; Enable %{modname} extension module
62 extension=%{modname}.so
63 EOF
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 %php_webserver_restart
70
71 %postun
72 if [ "$1" = 0 ]; then
73         %php_webserver_restart
74 fi
75
76 %files
77 %defattr(644,root,root,755)
78 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
79 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.15469 seconds and 3 git commands to generate.