# disable debuginfo package %define debug_package %{nil} Summary: Smokeping is a traffic grapher that uses rrdtool. Name: smokeping Version: 1.20 Release: 3.9 Source: http://people.ee.ethz.ch/~oetiker/webtools/smokeping-%version.tar.gz Source1: smokeping.init Source2: smokeping-httpd.conf Patch1: smokeping-1.20-fixpaths Patch2: smokeping-1.20-config Packager: Milan Kerslager 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 .fixpaths %patch2 -p1 -b .config %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 # fix paths perl -pi -e 's/sepp\/bin\/([a-z]*)/bin\/$1/' doc/FPing* etc/config.dist lib/probes/FPing.pm 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 # remove speedy for RH 9 (it does not compile yet) perl -pi -e 's@/speedy@/perl@' %{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 * 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.