]> git.pld-linux.org Git - packages/php-rrdtool.git/blob - php-rrdtool.spec
- longer description, added TODO
[packages/php-rrdtool.git] / php-rrdtool.spec
1 # TODO
2 # - doesn't work:
3 # $ php -r 'print rrd_graph();'
4 # PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'rrdtool.so'  in Unknown on line 0
5 # PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'rrdtool.so'  in Unknown on line 0
6 # PHP Fatal error:  Call to undefined function rrd_graph() in Command line code on line 1
7 %define         _modname        rrdtool
8 %define         _sysconfdir     /etc/php
9 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
10 Summary:        RRDtool PHP module
11 Summary(pl):    Modu³ PHP RRDtool
12 Name:           php-rrdtool
13 Version:        1.0.50
14 Release:        0.2
15 License:        GPL
16 Group:          Applications/Databases
17 Source0:        http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x/rrdtool-%{version}.tar.gz
18 # Source0-md5:  c466e2e7df95fa8e318e46437da87686
19 URL:            http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
20 BuildRequires:  autoconf >= 2.59
21 BuildRequires:  automake
22 BuildRequires:  cgilibc-devel
23 BuildRequires:  php-devel >= 4:5.0
24 BuildRequires:  rrdtool-devel
25 BuildRequires:  gd-devel
26 Requires(post,preun):   php-common
27 Requires:       %{_sysconfdir}/conf.d
28 %requires_eq_to php-common php-devel
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 This package includes a dynamic shared object (DSO) that adds RRDtool
33 bindings to the PHP HTML-embedded scripting language.
34
35 %description -n php-rrdtool -l pl
36 Modu³ RRDtool dla PHP.
37
38 %prep
39 %setup -q -n rrdtool-%{version}
40
41 %build
42 cd contrib/php4
43 %{__libtoolize}
44 %{__aclocal}
45 %{__autoconf}
46 %configure \
47         --with-openssl \
48         --includedir="%{_includedir}/php"
49
50 %{__make}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{_examplesdir}/%{name}-%{version}}
55
56 cd contrib/php4
57 %{__make} install \
58         INSTALL_ROOT=$RPM_BUILD_ROOT
59
60 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
61 ; Enable %{_modname} extension module
62 extension=%{_modname}.so
63 EOF
64
65 cp -a examples/*.php $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
72 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
73
74 %postun
75 if [ "$1" = 0 ]; then
76         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
77         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
78 fi
79
80 %files
81 %defattr(644,root,root,755)
82 %doc contrib/php4/USAGE
83 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/%{_modname}.ini
84 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
85 %{_examplesdir}/%{name}-%{version}
This page took 0.394811 seconds and 3 git commands to generate.