]> git.pld-linux.org Git - packages/php-rrdtool.git/blob - php-rrdtool.spec
allow building with php_suffix
[packages/php-rrdtool.git] / php-rrdtool.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname rrdtool
3 Summary:        RRDtool PHP module
4 Summary(pl.UTF-8):      Moduł PHP RRDtool
5 Name:           %{php_name}-%{modname}
6 Version:        1.2
7 Release:        8
8 License:        GPL
9 Group:          Applications/Databases
10 Source0:        http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.tgz
11 # Source0-md5:  c86a45cfc54517b9066c480bbc589d43
12 URL:            http://oss.oetiker.ch/rrdtool/
13 BuildRequires:  %{php_name}-devel >= 3:5.0.4
14 BuildRequires:  rpmbuild(macros) >= 1.322
15 BuildRequires:  rrdtool-devel >= 1.2.10
16 BuildRequires:  sed >= 4.0
17 %{?requires_php_extension}
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 This package includes a dynamic shared object (DSO) that adds RRDtool
22 bindings to the PHP HTML-embedded scripting language.
23
24 %description -l pl.UTF-8
25 Ten pakiet zawiera dynamiczny moduł (DSO) dodający dowiązania RRDtoola
26 do języka skryptowego PHP.
27
28 %prep
29 %setup -q -n rrdtool
30
31 sed -i -e 's,/lib\>,/%{_lib},' config.m4
32
33 %build
34 phpize
35 %configure \
36         --with-rrdtool=shared
37
38 %{__make}
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
43 %{__make} install \
44         INSTALL_ROOT=$RPM_BUILD_ROOT
45
46 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
47 ; Enable %{modname} extension module
48 extension=%{modname}.so
49 EOF
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %php_webserver_restart
56
57 %postun
58 if [ "$1" = 0 ]; then
59         %php_webserver_restart
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
65 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.02742 seconds and 3 git commands to generate.