]> git.pld-linux.org Git - packages/php-pecl-yaml.git/blame - php-pecl-yaml.spec
update BR
[packages/php-pecl-yaml.git] / php-pecl-yaml.spec
CommitLineData
26e964bf
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname yaml
7Summary: YAML-1.1 parser and emitter
8Name: %{php_name}-pecl-%{modname}
9Version: 1.1.1
10Release: 1
11License: MIT
12Group: Development/Languages/PHP
13Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14# Source0-md5: 5ea624ec23fe9ad20e4f24ee43da72b1
15URL: http://pecl.php.net/package/yaml/
16%{?with_tests:BuildRequires: %{php_name}-cli}
17BuildRequires: %{php_name}-devel >= 4:5.2.0
0f8277a0 18BuildRequires: re2c
26e964bf 19BuildRequires: rpmbuild(macros) >= 1.666
0f8277a0 20BuildRequires: yaml-devel
26e964bf
ER
21%{?requires_php_extension}
22Provides: php(yaml) = %{version}
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26Support for YAML 1.1 (YAML Ain't Markup Language) serialization using
27the LibYAML library.
28
29%prep
30%setup -qc
31mv %{modname}-%{version}/* .
32
33%build
34phpize
35%configure
36%{__make}
37
38%if %{with tests}
39# simple module load test
40%{__php} -n -q \
41 -d extension_dir=modules \
42 -d extension=%{modname}.so \
43 -m > modules.log
44grep %{modname} modules.log
45
46export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
47%{__make} test \
48 PHP_EXECUTABLE=%{__php}
49%endif
50
51%install
52rm -rf $RPM_BUILD_ROOT
53%{__make} install \
54 EXTENSION_DIR=%{php_extensiondir} \
55 INSTALL_ROOT=$RPM_BUILD_ROOT
56
57install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
58cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
59; Enable %{modname} extension module
60extension=%{modname}.so
61EOF
62
63%clean
64rm -rf $RPM_BUILD_ROOT
65
66%post
67%php_webserver_restart
68
69%postun
70if [ "$1" = 0 ]; then
71 %php_webserver_restart
72fi
73
74%files
75%defattr(644,root,root,755)
2f40e011 76%doc README CREDITS LICENSE
26e964bf
ER
77%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
78%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.141943 seconds and 4 git commands to generate.