]> git.pld-linux.org Git - packages/php-pecl-xhprof.git/blame - php-pecl-xhprof.spec
- obsolete old php name
[packages/php-pecl-xhprof.git] / php-pecl-xhprof.spec
CommitLineData
c2426d47
ER
1%define php_name php%{?php_suffix}
2%define modname xhprof
0859de93 3Summary: PHP extension for XHProf, a Hierarchical Profiler
c2426d47 4Name: %{php_name}-pecl-xhprof
8c6e6389 5Version: 0.9.4
6c237923 6Release: 3
0859de93
ER
7License: Apache v2.0
8Group: Development/Languages/PHP
9Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
8c6e6389 10# Source0-md5: ab4062a7337e3bdaa2fd7065a7942b8d
0859de93
ER
11Source1: %{modname}.ini
12Source2: apache.conf
13URL: http://pecl.php.net/package/xhprof
c2426d47 14BuildRequires: %{php_name}-devel >= 4:5.2.0
62ad4ea7 15BuildRequires: rpmbuild(macros) >= 1.666
0859de93 16%{?requires_php_extension}
ad8f59fb 17Provides: php(xhprof) = %{version}
6c237923 18Obsoletes: php-pecl-xhprof < 0.9.4-2
0859de93
ER
19# https://bugs.php.net/61262
20ExclusiveArch: %{ix86} %{x8664}
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%define _webapps /etc/webapps
24%define _webapp %{modname}
25%define _sysconfdir %{_webapps}/%{_webapp}
26%define _appdir %{_datadir}/%{_webapp}
27
28%description
29XHProf is a function-level hierarchical profiler for PHP.
30
31This package provides the raw data collection component, implemented
32in C (as a PHP extension).
33
34The HTML based navigational interface is provided in the "xhprof"
35package.
36
37%package -n xhprof
38Summary: A Hierarchical Profiler for PHP - Web interface
39Group: Development/Tools
40Requires: %{_bindir}/dot
ad8f59fb 41Requires: php(core) >= 5.2.0
6c237923 42Requires: php(xhprof) = %{version}
0859de93
ER
43%if "%{_rpmversion}" >= "5"
44BuildArch: noarch
45%endif
46
47%description -n xhprof
48XHProf is a function-level hierarchical profiler for PHP and has a
49simple HTML based navigational interface.
50
51The raw data collection component, implemented in C (as a PHP
52extension, provided by the "php-pecl-xhprof" package).
53
54The reporting/UI layer is all in PHP. It is capable of reporting
55function-level inclusive and exclusive wall times, memory usage, CPU
56times and number of calls for each function.
57
58Additionally, it supports ability to compare two runs (hierarchical
59DIFF reports), or aggregate results from multiple runs.
60
61Documentation: %{_docdir}/%{name}-%{version}/docs/index.html
62
63%prep
64%setup -qc
65mv %{modname}-%{version}/* .
66
67# not to be installed
68mv xhprof_html/docs docs
69
70%build
71cd extension
72phpize
73%configure
74%{__make}
75cd -
76
77%if %{with tests}
78# simple module load test
62ad4ea7
ER
79%{__php} -n -q \
80 -d extension_dir=extension/modules \
81 -d extension=%{modname}.so \
82 -m > modules.log
83grep %{modname} modules.log
0859de93
ER
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88%{__make} install -C extension \
89 INSTALL_ROOT=$RPM_BUILD_ROOT
90
91install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
92cp -p %{SOURCE1} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
93
94install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
96
97# Install the web interface
98install -d $RPM_BUILD_ROOT%{_sysconfdir}
99cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
100
101install -d $RPM_BUILD_ROOT%{_datadir}/xhprof
102cp -a xhprof_html $RPM_BUILD_ROOT%{_datadir}/xhprof/xhprof_html
103cp -a xhprof_lib $RPM_BUILD_ROOT%{_datadir}/xhprof/xhprof_lib
104
105%clean
106rm -rf $RPM_BUILD_ROOT
107
108%post
109%php_webserver_restart
110
111%postun
112if [ "$1" = 0 ]; then
113 %php_webserver_restart
114fi
115
116%triggerin -n xhprof -- apache-base
117%webapp_register httpd %{_webapp}
118
119%triggerun -n xhprof -- apache-base
120%webapp_unregister httpd %{_webapp}
121
122%files
123%defattr(644,root,root,755)
124%doc CHANGELOG CREDITS README LICENSE
125%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
126%attr(755,root,root) %{php_extensiondir}/%{modname}.so
127%{_examplesdir}/%{name}-%{version}
128
129%files -n xhprof
130%defattr(644,root,root,755)
131%doc docs/*
132%dir %attr(750,root,http) %{_sysconfdir}
133%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
134%{_datadir}/xhprof
This page took 0.149431 seconds and 4 git commands to generate.