]> git.pld-linux.org Git - packages/php-pecl-yaml.git/blob - php-pecl-yaml.spec
new 1.1.1
[packages/php-pecl-yaml.git] / php-pecl-yaml.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname yaml
7 Summary:        YAML-1.1 parser and emitter
8 Name:           %{php_name}-pecl-%{modname}
9 Version:        1.1.1
10 Release:        1
11 License:        MIT
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)
22
23 %description
24 Support for YAML 1.1 (YAML Ain't Markup Language) serialization using
25 the LibYAML library.
26
27 %prep
28 %setup -qc
29 mv %{modname}-%{version}/* .
30
31 %build
32 phpize
33 %configure
34 %{__make}
35
36 %if %{with tests}
37 # simple module load test
38 %{__php} -n -q \
39         -d extension_dir=modules \
40         -d extension=%{modname}.so \
41         -m > modules.log
42 grep %{modname} modules.log
43
44 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
45 %{__make} test \
46         PHP_EXECUTABLE=%{__php}
47 %endif
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 %{__make} install \
52         EXTENSION_DIR=%{php_extensiondir} \
53         INSTALL_ROOT=$RPM_BUILD_ROOT
54
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
59 EOF
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 %php_webserver_restart
66
67 %postun
68 if [ "$1" = 0 ]; then
69         %php_webserver_restart
70 fi
71
72 %files
73 %defattr(644,root,root,755)
74 %doc CREDITS
75 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
76 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.026076 seconds and 3 git commands to generate.