Summary: Smokeping is a traffic grapher that uses rrdtool. Name: smokeping Version: 1.38 Release: 1.ker.rhel4 Source: http://people.ee.ethz.ch/~oetiker/webtools/smokeping-%version.tar.gz Source1: smokeping.init Source2: smokeping-httpd.conf Patch1: smokeping-1.38-config.patch License: GPL Group: Applications/Internet Requires: rrdtool, httpd, fping, perl BuildRequires: perl BuildRoot: /var/tmp/%{name}-root BuildArch: noarch %description SmokePing is a ICMP latency logging and graphing system. It consists of a daemon process which organizes the latency measurements and a CGI which presents the graphs with interesting smoke-like effects. %prep %setup -q %patch1 -p1 # fix paths for libraries perl -pi -e 's@use lib qw.*rrdtool.*$@use lib qw(/usr/lib/rrdtool);@' \ bin/smokeping.dist htdocs/smokeping.cgi.dist perl -pi -e 's@use lib qw.*smokeping.*$@use lib qw(/usr/lib/smokeping);@' \ bin/smokeping.dist htdocs/smokeping.cgi.dist # fix path for config file perl -pi -e 's@Smokeping::main.*config.*$@Smokeping::main("/etc/smokeping/config");@' \ bin/smokeping.dist perl -pi -e 's@Smokeping::cgi.*config.*$@Smokeping::cgi("/etc/smokeping/config");@' \ htdocs/smokeping.cgi.dist # fix paths for fping binary perl -pi -e 's@/usr/sepp/bin/fping@/usr/bin/fping@' doc/*/FPing* etc/config.dist lib/probes/FPing* # fix path for perl perl -pi -e 's@#!/usr/.*perl.*$@#!/usr/bin/perl -w@' \ bin/smokeping.dist doc/smokeping.pod etc/smokemail.dist # fix path for speedy perl -pi -e 's@#!/usr/.*speedy.*$@#!/usr/bin/speedy -w@' \ htdocs/smokeping.cgi.dist # remove speedy for RH 9 (it does not compile yet) #perl -pi -e 's@/speedy@/perl@' htdocs/smokeping.cgi.dist %build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} \ %{buildroot}/%{_mandir}/man1 \ %{buildroot}/%{_datadir}/%{name} \ %{buildroot}/%{_var}/smokeping/{datadir,imgcache} \ %{buildroot}/%{_libdir}/%{name} \ %{buildroot}/%{_sysconfdir}/{%{name},init.d,httpd/conf.d} # commpress and install the man pages gzip doc/*.1 install -m 0644 doc/*gz %{buildroot}/%{_mandir}/man1/ # install and fix the main binary file install -m 0755 bin/%{name}.dist %{buildroot}/%{_bindir}/%{name} # install Perl modules cp -a lib/* %{buildroot}/%{_libdir}/%{name} # install init script install -m 0755 %{S:1} %{buildroot}/%{_sysconfdir}/init.d/%{name} # install conf file for WWW server install -m 0644 %{S:2} %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf # install CGI binary install -m 0755 -o nobody -g nobody htdocs/%{name}.cgi.dist %{buildroot}/%{_datadir}/%{name}/smokeping.cgi # install config files for i in basepage.html config-echoping config smokemail; do install -m 0644 etc/$i.dist %{buildroot}/%{_sysconfdir}/%{name}/$i done %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/%{name}-%{version} %post /sbin/chkconfig --add smokeping %preun if [ $1 = 0 ]; then /sbin/chkconfig --del smokeping fi %files %defattr(-,root,root) %doc CHANGES CONTRIBUTORS COPYING COPYRIGHT README %{_bindir}/* %{_libdir}/*/* %config %{_sysconfdir}/%name/config %config %{_sysconfdir}/%name/config-echoping %config %{_sysconfdir}/%name/smokemail %config %{_sysconfdir}/%name/basepage.html %config %{_sysconfdir}/httpd/conf.d/%{name}.conf %{_sysconfdir}/init.d/%name %{_mandir}/*/* %{_datadir}/%{name}/%name.cgi %dir %attr(0755,root,root) %{_var}/smokeping/datadir %dir %attr(0755,apache,apache) %{_var}/smokeping/imgcache %changelog * Sat Mar 05 2005 Milan Kerslager 1.38-1.ker.rhel4 - fix paths with perl instead of making patches - update to the latest release - rebuild for RHEL4 * Sat Jan 03 2004 Milan Kerslager 1.24-1_WB3 - update * Tue May 13 2003 Milan Kerslager 1.20-3.9 - CGI with perl interpret instead of speedy because speedy does not compile on RH 9 yet * Sun May 11 2003 Milan Kerslager 1.20-2.9 - missing conf file for WWW daemon Apache added - post and preun sections added * Mon Apr 28 2003 Milan Kerslager - update to version 1.20 - rebuild for RH 9 with almost rewritten SPEC file * Sun Jan 20 2002 Hal Burgiss - Upped to 0.99.10. Missed noting 99.9 :) * Thu Jan 03 2002 Hal Burgiss - Upped to 0.99.8 * Wed Dec 05 2001 Hal Burgiss - Initial spec file.