3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
7 Summary: SPX - A simple profiler for PHP
8 Name: %{php_name}-pecl-%{modname}
12 Group: Development/Languages/PHP
13 Source0: https://github.com/NoiseByNorthwest/php-spx/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 599bd8812d1abbf804af8dc47c967c71
15 URL: https://github.com/NoiseByNorthwest/php-spx
16 BuildRequires: %{php_name}-cli
17 BuildRequires: %{php_name}-devel >= 4:5.6
18 BuildRequires: rpmbuild(macros) >= 1.666
19 BuildRequires: zlib-devel
20 %{?requires_php_extension}
21 Provides: php(%{modname}) = %{version}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 A simple & straight-to-the-point PHP profiling extension with its
29 %setup -qn php-%{modname}-%{version}
36 # simple module load test
38 -d extension_dir=modules \
39 -d extension=%{modname}.so \
40 -r 'exit(extension_loaded("%{modname}") ? 0 : 1);'
43 rm -rf $RPM_BUILD_ROOT
45 EXTENSION_DIR=%{php_extensiondir} \
46 INSTALL_ROOT=$RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
49 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
50 ; Enable %{modname} extension module
51 extension=%{modname}.so
55 rm -rf $RPM_BUILD_ROOT
58 %php_webserver_restart
62 %php_webserver_restart
66 %defattr(644,root,root,755)
68 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
69 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
70 %{_datadir}/misc/php-spx