]> git.pld-linux.org Git - packages/php-rrdtool.git/blob - php-rrdtool.spec
- updated to new version from contrib (let's call it 1.2 as it's ready for rrdtool...
[packages/php-rrdtool.git] / php-rrdtool.spec
1 %define         _modname        rrdtool
2 %define         _sysconfdir     /etc/php
3 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
4 Summary:        RRDtool PHP module
5 Summary(pl):    Modu³ PHP RRDtool
6 Name:           php-rrdtool
7 Version:        1.2
8 Release:        1
9 License:        GPL
10 Group:          Applications/Databases
11 Source0:        http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.tgz
12 # Source0-md5:  c86a45cfc54517b9066c480bbc589d43
13 URL:            http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
14 BuildRequires:  php-devel >= 3:5.0.0
15 BuildRequires:  rpmbuild(macros) >= 1.238
16 BuildRequires:  rrdtool-devel >= 1.2.10
17 BuildRequires:  sed >= 4.0
18 %{?requires_php_extension}
19 Requires:       %{_sysconfdir}/conf.d
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 This package includes a dynamic shared object (DSO) that adds RRDtool
24 bindings to the PHP HTML-embedded scripting language.
25
26 %description -l pl
27 Ten pakiet zawiera dynamiczny modu³ (DSO) dodaj±cy dowi±zania RRDtoola
28 do jêzyka skryptowego PHP.
29
30 %prep
31 %setup -q -n rrdtool
32
33 sed -i -e 's,/lib\>,/%{_lib},' config.m4
34
35 %build
36 phpize
37 %configure \
38         --with-rrdtool=shared
39
40 %{__make}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{_examplesdir}/%{name}-%{version}}
45
46 %{__make} install \
47         INSTALL_ROOT=$RPM_BUILD_ROOT
48
49 cat <<'EOF' > $RPM_BUILD_ROOT%{_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 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
59 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
60
61 %postun
62 if [ "$1" = 0 ]; then
63         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
64         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
65 fi
66
67 %files
68 %defattr(644,root,root,755)
69 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
70 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.081768 seconds and 4 git commands to generate.