]> git.pld-linux.org Git - packages/php-pecl-msgpack.git/blame - php-pecl-msgpack.spec
up to 0.5.6
[packages/php-pecl-msgpack.git] / php-pecl-msgpack.spec
CommitLineData
1637b078
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname msgpack
7Summary: PHP extension for interfacing with MessagePack
8Name: %{php_name}-pecl-%{modname}
27ede28f 9Version: 0.5.6
1637b078
ER
10Release: 1
11License: PHP 3.01
12Group: Development/Languages/PHP
13Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
27ede28f 14# Source0-md5: 895b90dc4bfdf2c7575b166ca68cbfc5
1637b078
ER
15URL: http://pecl.php.net/package/msgpack/
16BuildRequires: %{php_name}-devel
17BuildRequires: rpmbuild(macros) >= 1.666
18%if %{with tests}
19BuildRequires: %{php_name}-cli
658f8502 20BuildRequires: %{php_name}-pcre
1637b078
ER
21BuildRequires: %{php_name}-session
22BuildRequires: %{php_name}-spl
23%endif
24%{?requires_php_extension}
25Requires: %{php_name}-session
26Provides: php(msgpack) = %{version}
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30This extension provide API for communicating with MessagePack
31serialization.
32
33MessagePack is a binary-based efficient object serialization library.
34It enables to exchange structured objects between many languages like
35JSON. But unlike JSON, it is very fast and small.
36
37%prep
38%setup -qc
39mv %{modname}-%{version}/* .
40
41%build
42phpize
43%configure
44%{__make}
45
46%if %{with tests}
47# simple module load test
48%{__php} -n -q \
49 -d extension_dir=modules \
658f8502 50 -d extension=%{php_extensiondir}/pcre.so \
1637b078
ER
51 -d extension=%{php_extensiondir}/spl.so \
52 -d extension=%{php_extensiondir}/session.so \
53 -d extension=%{modname}.so \
54 -m > modules.log
55grep %{modname} modules.log
56
57export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
58%{__make} test \
59 PHP_EXECUTABLE=%{__php} \
658f8502 60 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl session"
1637b078
ER
61%endif
62
63%install
64rm -rf $RPM_BUILD_ROOT
65%{__make} install \
66 EXTENSION_DIR=%{php_extensiondir} \
67 INSTALL_ROOT=$RPM_BUILD_ROOT
68
69install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
70cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
71; Enable %{modname} extension module
72extension=%{modname}.so
73EOF
74
75# no -devel package yet
76%{__rm} $RPM_BUILD_ROOT%{_includedir}/php/ext/msgpack/php_msgpack.h
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%post
82%php_webserver_restart
83
84%postun
85if [ "$1" = 0 ]; then
86 %php_webserver_restart
87fi
88
89%files
90%defattr(644,root,root,755)
91%doc CREDITS EXPERIMENTAL
92%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
93%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.085289 seconds and 4 git commands to generate.