3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
7 Summary: YAML-1.1 parser and emitter
8 Name: %{php_name}-pecl-%{modname}
12 Group: Development/Languages/PHP
13 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14 # Source0-md5: 5ea624ec23fe9ad20e4f24ee43da72b1
15 URL: http://pecl.php.net/package/yaml/
16 %{?with_tests:BuildRequires: %{php_name}-cli}
17 BuildRequires: %{php_name}-devel >= 4:5.2.0
18 BuildRequires: rpmbuild(macros) >= 1.666
19 %{?requires_php_extension}
20 Provides: php(yaml) = %{version}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Support for YAML 1.1 (YAML Ain't Markup Language) serialization using
29 mv %{modname}-%{version}/* .
37 # simple module load test
39 -d extension_dir=modules \
40 -d extension=%{modname}.so \
42 grep %{modname} modules.log
44 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
46 PHP_EXECUTABLE=%{__php}
50 rm -rf $RPM_BUILD_ROOT
52 EXTENSION_DIR=%{php_extensiondir} \
53 INSTALL_ROOT=$RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
56 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
57 ; Enable %{modname} extension module
58 extension=%{modname}.so
62 rm -rf $RPM_BUILD_ROOT
65 %php_webserver_restart
69 %php_webserver_restart
73 %defattr(644,root,root,755)
75 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
76 %attr(755,root,root) %{php_extensiondir}/%{modname}.so