]> git.pld-linux.org Git - packages/php-pecl-tideways_xhprof.git/blob - php-pecl-tideways_xhprof.spec
Release 1
[packages/php-pecl-tideways_xhprof.git] / php-pecl-tideways_xhprof.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname tideways_xhprof
7 Summary:        %{modname} Tideways XHProf Extension
8 Name:           %{php_name}-pecl-%{modname}
9 Version:        5.0.2
10 Release:        1
11 License:        Apache v2.0
12 Group:          Development/Languages/PHP
13 Source0:        https://github.com/tideways/php-xhprof-extension/archive/v%{version}/%{modname}-%{version}.tar.gz
14 # Source0-md5:  374cf4ff7ba03401a279777abe94815d
15 URL:            https://github.com/tideways/php-xhprof-extension
16 BuildRequires:  %{php_name}-cli
17 BuildRequires:  %{php_name}-devel >= 4:7.0
18 BuildRequires:  rpmbuild(macros) >= 1.666
19 %{?requires_php_extension}
20 Provides:       php(%{modname}) = %{version}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Modern XHProf compatible PHP Profiler.
25
26 %prep
27 %setup -qc
28 mv php-xhprof-extension-%{version}/* .
29
30 %build
31 phpize
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
40 grep %{modname} modules.log
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 %{__make} install \
45         EXTENSION_DIR=%{php_extensiondir} \
46         INSTALL_ROOT=$RPM_BUILD_ROOT
47
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
52 EOF
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 %php_webserver_restart
59
60 %postun
61 if [ "$1" = 0 ]; then
62         %php_webserver_restart
63 fi
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.070764 seconds and 3 git commands to generate.