]> git.pld-linux.org Git - SPECS.git/blob - php-pecl-spx.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / php-pecl-spx.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname spx
7 Summary:        SPX - A simple profiler for PHP
8 Name:           %{php_name}-pecl-%{modname}
9 Version:        0.4.7
10 Release:        1
11 License:        PHP 3.01
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)
23
24 %description
25 A simple & straight-to-the-point PHP profiling extension with its
26 built-in web UI.
27
28 %prep
29 %setup -qn php-%{modname}-%{version}
30
31 %build
32 phpize
33 %configure
34 %{__make}
35
36 # simple module load test
37 %{__php} -n -q \
38         -d extension_dir=modules \
39         -d extension=%{modname}.so \
40         -r 'exit(extension_loaded("%{modname}") ? 0 : 1);'
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
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
This page took 0.493476 seconds and 3 git commands to generate.