1 %define with_python %{?_without_python: 0} %{?!_without_python: 1}
2 %define with_php %{?_without_php: 0} %{?!_without_php: 1}
3 %define with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
4 %define with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1}
5 %define php_rrd_svn 839
6 %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
8 Summary: Round Robin Database Tool to store and display time-series data
10 Version: 1.2.99907080300
13 Group: Applications/Databases
14 URL: http://oss.oetiker.ch/rrdtool/
15 #Source0: http://oss.oetiker.ch/%{name}/pub/%{name}-%{version}.tar.gz
16 Source0: http://oss.oetiker.ch/rrdtool/pub/beta/rrdtool-trunk-svn-snap.tar.gz
17 Source1: php4-svn%{php_rrd_svn}.tar.gz
18 Patch0: rrdtool-1.2.13-php.patch
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 BuildRequires: gcc-c++, openssl-devel, freetype-devel
21 BuildRequires: libpng-devel, zlib-devel, cairo-devel
22 BuildRequires: perl-ExtUtils-MakeMaker
23 %if "%{?fedora}" >= "7"
24 BuildRequires: perl-devel
28 RRD is the Acronym for Round Robin Database. RRD is a system to store and
29 display time-series data (i.e. network bandwidth, machine-room temperature,
30 server load average). It stores the data in a very compact way that will not
31 expand over time, and it presents useful graphs by processing the data to
32 enforce a certain data density. It can be used either via simple wrapper
33 scripts (from shell or Perl) or via frontends that poll network devices and
34 put a friendly user interface on it.
37 Summary: RRDtool libraries and header files
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 RRD is the Acronym for Round Robin Database. RRD is a system to store and
43 display time-series data (i.e. network bandwidth, machine-room temperature,
44 server load average). This package allow you to use directly this library.
47 Summary: RRDtool documentation
51 RRD is the Acronym for Round Robin Database. RRD is a system to store and
52 display time-series data (i.e. network bandwidth, machine-room temperature,
53 server load average). This package contains documentation on using RRD.
56 Summary: Perl RRDtool bindings
57 Group: Development/Languages
58 Requires: %{name} = %{version}-%{release}
59 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
60 Obsoletes: perl-%{name} < %{version}-%{release}
61 Provides: perl-%{name} = %{version}-%{release}
64 The Perl RRDtool bindings
67 %{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')}
68 # eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot
69 %{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")}
72 Summary: Python RRDtool bindings
73 Group: Development/Languages
74 BuildRequires: python-devel >= 2.3
75 Requires: python >= %{python_version}
76 Requires: %{name} = %{version}-%{release}
77 Obsoletes: python-%{name} < %{version}-%{release}
78 Provides: python-%{name} = %{version}-%{release}
81 Python RRDtool bindings.
85 # php bits busted on ppc64 at the moment
91 Summary: PHP RRDtool bindings
92 Group: Development/Languages
93 BuildRequires: php-devel >= 4.0
95 Requires: %{name} = %{version}-%{release}
96 Obsoletes: php-%{name} < %{version}-%{release}
97 Provides: php-%{name} = %{version}-%{release}
100 The %{name}-php package includes a dynamic shared object (DSO) that adds
101 RRDtool bindings to the PHP HTML-embedded scripting language.
106 Summary: Tcl RRDtool bindings
107 Group: Development/Languages
108 BuildRequires: tcl-devel >= 8.0
110 Requires: %{name} = %{version}-%{release}
111 Obsoletes: tcl-%{name} < %{version}-%{release}
112 Provides: tcl-%{name} = %{version}-%{release}
115 The %{name}-tcl package includes RRDtool bindings for Tcl.
119 %{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
122 Summary: Ruby RRDtool bindings
123 Group: Development/Languages
124 BuildRequires: ruby, ruby-devel
125 Requires: ruby(abi) = 1.8
126 Requires: %{name} = %{version}-%{release}
129 The %{name}-ruby package includes RRDtool bindings for Ruby.
134 %setup -q -n %{name}-%{version}
136 # Patch based on http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tgz
139 %{__perl} -pi -e 's|../config.h|../rrd_config.h|g' php4/rrdtool.c
142 # Fix to find correct python dir on lib64
143 %{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \
146 # Most edits shouldn't be necessary when using --libdir, but
147 # w/o, some introduce hardcoded rpaths where they shouldn't,
148 %{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' \
149 configure Makefile.in php4/configure php4/ltconfig*
153 --with-perl-options='INSTALLDIRS="vendor"' \
156 --with-tcllib=%{_libdir} \
171 # Fix another rpath issue
172 %{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \
173 bindings/perl-shared/Makefile.PL
175 # Force RRDp bits where we want 'em, not sure yet why the
176 # --with-perl-options and --libdir don't take
177 pushd bindings/perl-piped/
178 %{__perl} Makefile.PL INSTALLDIRS=vendor
179 %{__perl} -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile
182 %{__make} %{?_smp_mflags}
184 # Build the php module, the tmp install is required
186 %define rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
187 %{__make} install DESTDIR="%{rrdtmp}"
190 --with-rrdtool="%{rrdtmp}%{_prefix}" \
192 %{__make} %{?_smp_mflags}
194 %{__rm} -rf %{rrdtmp}
197 # Fix @perl@ and @PERL@
198 find examples/ -type f \
199 -exec %{__perl} -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
200 find examples/ -name "*.pl" \
201 -exec %{__perl} -pi -e 's|\015||gi' {} \;
204 rm -rf $RPM_BUILD_ROOT
205 make DESTDIR="$RPM_BUILD_ROOT" install
207 # Install the php module
209 %{__install} -D -m0755 php4/modules/rrdtool.so \
210 %{buildroot}%{php_extdir}/rrdtool.so
211 # Clean up the examples for inclusion as docs
212 %{__rm} -rf php4/examples/.svn
213 # Put the php config bit into place
214 %{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
215 %{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/rrdtool.ini
216 ; Enable rrdtool extension module
222 %{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
224 # We only want .txt and .html files for the main documentation
225 %{__mkdir_p} doc2/html doc2/txt
226 %{__cp} -a doc/*.txt doc2/txt/
227 %{__cp} -a doc/*.html doc2/html/
229 # Put perl docs in perl package
230 %{__mkdir_p} doc3/html
231 %{__mv} doc2/html/RRD*.html doc3/html/
233 # Clean up the examples
234 %{__rm} -f examples/Makefile* examples/*.in
236 # This is so rpm doesn't pick up perl module dependencies automatically
237 find examples/ -type f -exec chmod 0644 {} \;
239 # Clean up the buildroot
240 %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/{txt,html}/ \
241 $RPM_BUILD_ROOT%{perl_vendorarch}/ntmake.pl \
242 $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
243 $RPM_BUILD_ROOT%{_datadir}/%{name}/examples \
244 $RPM_BUILD_ROOT%{perl_vendorarch}/auto/*/{.packlist,*.bs}
247 %{__rm} -rf $RPM_BUILD_ROOT
249 %post -p /sbin/ldconfig
251 %postun -p /sbin/ldconfig
254 %defattr(-,root,root,-)
261 %defattr(-,root,root,-)
263 %exclude %{_libdir}/*.la
267 %defattr(-,root,root,-)
268 %doc CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO NEWS THREADS
269 %doc examples doc2/html doc2/txt
272 %defattr(-,root,root,-)
275 %{perl_vendorarch}/*.pm
276 %attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/
280 %defattr(-,root,root,-)
281 %doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
282 %{python_sitearch}/rrdtoolmodule.so
287 %defattr(-,root,root,0755)
288 %doc php4/examples php4/README
289 %config(noreplace) %{_sysconfdir}/php.d/rrdtool.ini
290 %{php_extdir}/rrdtool.so
295 %defattr(-,root,root,-)
296 %doc bindings/tcl/README
297 %{_libdir}/tclrrd*.so
298 %{_libdir}/rrdtool/*.tcl
303 %defattr(-,root,root,-)
304 %doc bindings/ruby/README
305 %{ruby_sitearch}/RRD.so
309 * Fri Jun 15 2007 Jarod Wilson <jwilson@redhat.com> 1.2.999050724000-0.1
310 - Update for rrdtool pre-1.3 snapshot
312 * Mon May 21 2007 Jarod Wilson <jwilson@redhat.com> 1.2.23-5
313 - BR: ruby so %%ruby_sitearch gets set
315 * Mon May 21 2007 Jarod Wilson <jwilson@redhat.com> 1.2.23-4
316 - Build ruby bindings
318 * Thu May 03 2007 Jarod Wilson <jwilson@redhat.com> 1.2.23-3
319 - Disable php bits on ppc64 for now, they fail to build
321 * Thu May 03 2007 Jarod Wilson <jwilson@redhat.com> 1.2.23-2
322 - Add BR: perl-devel for Fedora 7 and later
324 * Tue May 01 2007 Jarod Wilson <jwilson@redhat.com> 1.2.23-1
325 - New upstream release
327 * Tue May 01 2007 Jarod Wilson <jwilson@redhat.com> 1.2.21-1
328 - New upstream release
330 * Wed Apr 25 2007 Jarod Wilson <jwilson@redhat.com> 1.2.19-2
331 - Define %%python_version *before* its needed (#237826)
333 * Mon Apr 09 2007 Jarod Wilson <jwilson@redhat.com> 1.2.19-1
334 - New upstream release
336 * Tue Jan 23 2007 Jarod Wilson <jwilson@redhat.com> 1.2.18-1
337 - New upstream release
339 * Mon Jan 22 2007 Jarod Wilson <jwilson@redhat.com> 1.2.17-1
340 - New upstream release
342 * Tue Jan 02 2007 Jarod Wilson <jwilson@redhat.com> 1.2.15-9
343 - Fix crash with long error strings (upstream
344 changesets 929 and 935)
346 * Thu Dec 14 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-8
347 - Fix for log grid memory leak (#201241)
349 * Tue Dec 12 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-7
350 - Rebuild for python 2.5
352 * Tue Nov 14 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-6
353 - Conditionalize python, php and tcl bits (Resolves #203275)
355 * Wed Oct 25 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-5
356 - Add tcl sub-package (#203275)
358 * Tue Sep 05 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-4
359 - Rebuild for new glibc
361 * Wed Aug 02 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-3
362 - One more addition to initrrdtool patch, to fully revert
363 and correct upstream changeset 839
364 - Fix for no python in minimal fc4 buildroots
366 * Tue Aug 1 2006 Mihai Ibanescu <misa@redhat.com> 1.2.15-2
367 - Fixed rrdtool-python to import the module properly (patch
368 rrdtool-1.2.15-initrrdtool.patch)
370 * Mon Jul 17 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-1
372 - Minor spec cleanups
374 * Sat Jun 24 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-7
377 * Mon Jun 19 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-6
378 - Flip perl, php and python sub-package names around to
379 conform with general practices
381 * Sat Jun 10 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-5
382 - Minor fixes to make package own created directories
384 * Wed Jun 07 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-4
385 - Add php bits back into the mix
387 * Mon Jun 05 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-3
388 - Merge spec fixes from bz 185909
390 * Sun Jun 04 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-2
391 - Remove explicit perl dep, version grabbing using rpm during
392 rpmbuild not guaranteed to work (fails on ppc in plague),
393 and auto-gen perl deps are sufficient
395 * Sat Jun 03 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-1
396 - Update to release 1.2.13
397 - Merge spec changes from dag, atrpms and mdk builds
398 - Additional hacktastic contortions for lib64 & rpath messiness
399 - Add missing post/postun ldconfig
400 - Fix a bunch of rpmlint errors
401 - Disable static libs, per FE guidelines
404 * Wed Apr 19 2006 Chris Ricker <kaboom@oobleck.net> 1.2.12-1
407 * Fri May 20 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-5
408 - Include patch from Michael to fix perl module compilation on FC4 (#156242).
410 * Fri May 20 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-4
411 - Fix for the php module patch (Joe Pruett, Dag Wieers), #156716.
412 - Update source URL to new location since 1.2 is now the default stable.
413 - Don't (yet) update to 1.0.50, as it introduces some changes in the perl
416 * Mon Jan 31 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-3
417 - Put perl modules in vendor_perl and not site_perl. #146513
419 * Thu Jan 13 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-2
422 * Thu Aug 25 2004 Dag Wieers <dag@wieers.com> - 1.0.49-1
423 - Updated to release 1.0.49.
425 * Wed Aug 25 2004 Dag Wieers <dag@wieers.com> - 1.0.48-3
426 - Fixes for x86_64. (Garrick Staples)
428 * Fri Jul 2 2004 Matthias Saou <http://freshrpms.net/> 1.0.48-3
429 - Actually apply the patch for fixing the php module, doh!
431 * Thu May 27 2004 Matthias Saou <http://freshrpms.net/> 1.0.48-2
432 - Added php.d config entry to load the module once installed.
434 * Thu May 13 2004 Dag Wieers <dag@wieers.com> - 1.0.48-1
435 - Updated to release 1.0.48.
437 * Tue Apr 06 2004 Dag Wieers <dag@wieers.com> - 1.0.47-1
438 - Updated to release 1.0.47.
440 * Thu Mar 4 2004 Matthias Saou <http://freshrpms.net/> 1.0.46-2
441 - Change the strict dependency on perl to fix problem with the recent
444 * Mon Jan 5 2004 Matthias Saou <http://freshrpms.net/> 1.0.46-1
446 - Use system libpng and zlib instead of bundled ones.
447 - Added php-rrdtool sub-package for the php4 module.
449 * Fri Dec 5 2003 Matthias Saou <http://freshrpms.net/> 1.0.45-4
450 - Added epoch to the perl dependency to work with rpm > 4.2.
451 - Fixed the %% escaping in the perl dep.
453 * Mon Nov 17 2003 Matthias Saou <http://freshrpms.net/> 1.0.45-2
454 - Rebuild for Fedora Core 1.
456 * Sun Aug 3 2003 Matthias Saou <http://freshrpms.net/>
459 * Wed Apr 16 2003 Matthias Saou <http://freshrpms.net/>
462 * Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
463 - Rebuilt for Red Hat Linux 9.
465 * Wed Mar 5 2003 Matthias Saou <http://freshrpms.net/>
466 - Added explicit perl version dependency.
468 * Sun Feb 23 2003 Matthias Saou <http://freshrpms.net/>
471 * Fri Jan 31 2003 Matthias Saou <http://freshrpms.net/>
475 * Fri Jul 05 2002 Henri Gomez <hgomez@users.sourceforge.net>
478 * Mon Jun 03 2002 Henri Gomez <hgomez@users.sourceforge.net>
481 * Fri Apr 19 2002 Henri Gomez <hgomez@users.sourceforge.net>
484 * Tue Mar 12 2002 Henri Gomez <hgomez@users.sourceforge.net>
486 - rrdtools include zlib 1.1.4 which fix vulnerabilities in 1.1.3