]> git.pld-linux.org Git - packages/php-pecl-stats.git/blob - php-pecl-stats.spec
77cbe79276c4f6a637b83f3361bca906d1fe1e3e
[packages/php-pecl-stats.git] / php-pecl-stats.spec
1 %define         _modname        stats
2 %define         _status         stable
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5
6 Summary:        %{_modname} - extension with routines for statistical computation
7 Summary(pl):    %{_modname} - rozszerzenie z funkcjami do wykonywania obliczeñ statystycznych
8 Name:           php-pecl-%{_modname}
9 Version:        1.0.0
10 Release:        1
11 License:        PHP 2.02
12 Group:          Development/Languages/PHP
13 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
14 # Source0-md5:  aaab90d3b8c2da8db07c09305a8feebc
15 URL:            http://pecl.php.net/package/stats/
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.254
18 %{?requires_php_extension}
19 Requires:       %{_sysconfdir}/conf.d
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Extension that provides few dozens routines for statistical
24 computation, such as stats_absolute_deviation(), stats_covariance(),
25 harmonic_mean() and others.
26
27 In PECL status of this extension is: %{_status}.
28
29 %description -l pl
30 To rozszerzenie dostarcza wiele ró¿nych funkcji do wykonywania
31 obliczeñ statystycznych, takich jak stats_absolute_deviation(),
32 stats_covariance(), harmonic_mean() i inne.
33
34 To rozszerzenie ma w PECL status: %{_status}.
35
36 %prep
37 %setup -q -c
38
39 %build
40 cd %{_modname}-%{version}
41 phpize
42 %configure
43 %{__make}
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
48
49 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
50 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
51 ; Enable %{_modname} extension module
52 extension=%{_modname}.so
53 EOF
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
60 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
61
62 %postun
63 if [ "$1" = 0 ]; then
64         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
65         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
66 fi
67
68 %files
69 %defattr(644,root,root,755)
70 %doc %{_modname}-%{version}/{CREDITS,TODO}
71 %doc %{_modname}-%{version}/tests
72 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
73 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.059255 seconds and 2 git commands to generate.