Summary: Smokeping is a traffic grapher that uses rrdtool. Name: smokeping Version: 2.4.2 Release: 2%{?dist} Source: http://oss.oetiker.ch/smokeping/pub/smokeping-%version.tar.gz Source1: smokeping.init Source2: smokeping-httpd.conf Patch1: smokeping-2.4.2-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 -b .orig # 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 # add perl library path perl -pi -e "s@^use strict;@use lib qw(/usr/%{_lib}/smokeping);\nuse strict;@" bin/smokeping.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/sbin/fping@' doc/Smokeping/*/FPing* lib/Smokeping/probes/FPing* # fix path for perl perl -pi -e 's@#!/usr/.*perl.*$@#!/usr/bin/perl -w@' bin/smokeping.dist etc/smokemail.dist # fix path for speedy perl -pi -e 's@#!/usr/.*speedy.*$@#!/usr/bin/speedy -w@' htdocs/smokeping.cgi.dist %build rm -vf lib/Smokeping/probes/TacacsPlus.pm %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 name of 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 htdocs/%{name}.cgi.dist %{buildroot}/%{_datadir}/%{name}/smokeping.cgi # install config files install -m 0644 etc/basepage.html.dist %{buildroot}/%{_sysconfdir}/%{name}/basepage.html install -m 0644 etc/config.dist %{buildroot}/%{_sysconfdir}/%{name}/config install -m 0644 etc/smokemail.dist %{buildroot}/%{_sysconfdir}/%{name}/smokemail install -m 0644 doc/examples/config.echoping %{buildroot}/%{_sysconfdir}/%{name} %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}/*/* %attr(0755,nobody,nobody) %{_datadir}/%{name}/%name.cgi %dir %attr(0755,root,root) %{_var}/smokeping/datadir %dir %attr(0755,apache,apache) %{_var}/smokeping/imgcache %changelog * Wed Jun 29 2011 Milan Kerslager 2.4.2-1.ker.rhel5 - updated to 2.4.2 - disabled/removed lib/Smokeping/probes/TacacsPlus.pm * 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.