]> git.pld-linux.org Git - packages/php-pecl-tideways_xhprof.git/blame - php-pecl-tideways_xhprof.spec
New package php-pecl-tideways_xhprof, version 5.0.2
[packages/php-pecl-tideways_xhprof.git] / php-pecl-tideways_xhprof.spec
CommitLineData
b7c6c368
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname tideways_xhprof
7Summary: %{modname} Tideways XHProf Extension
8Name: %{php_name}-pecl-%{modname}
9Version: 5.0.2
10Release: 0.1
11License: Apache v2.0
12Group: Development/Languages/PHP
13Source0: https://github.com/tideways/php-xhprof-extension/archive/v%{version}/%{modname}-%{version}.tar.gz
14# Source0-md5: 374cf4ff7ba03401a279777abe94815d
15URL: https://github.com/tideways/php-xhprof-extension
16BuildRequires: %{php_name}-cli
17BuildRequires: %{php_name}-devel >= 4:7.0
18BuildRequires: rpmbuild(macros) >= 1.666
19%{?requires_php_extension}
20Provides: php(%{modname}) = %{version}
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
24Modern XHProf compatible PHP Profiler.
25
26%prep
27%setup -qc
28mv php-xhprof-extension-%{version}/* .
29
30%build
31phpize
32%configure
33%{__make}
34
35# simple module load test
36%{__php} -n -q \
37 -d extension_dir=modules \
38 -d extension=%{modname}.so \
39 -m > modules.log
40grep %{modname} modules.log
41
42%install
43rm -rf $RPM_BUILD_ROOT
44%{__make} install \
45 EXTENSION_DIR=%{php_extensiondir} \
46 INSTALL_ROOT=$RPM_BUILD_ROOT
47
48install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
49cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
50; Enable %{modname} extension module
51extension=%{modname}.so
52EOF
53
54%clean
55rm -rf $RPM_BUILD_ROOT
56
57%post
58%php_webserver_restart
59
60%postun
61if [ "$1" = 0 ]; then
62 %php_webserver_restart
63fi
64
65%files
66%defattr(644,root,root,755)
67%doc README.md CHANGELOG.md NOTICE
68%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
69%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.100799 seconds and 4 git commands to generate.