%define name RRDBrowse %define version 1.6 %define release 2mdk Summary: RRDBrowse is a poller daemon, templater and webinterface for rrdtool. Name: %name Version: %version Release: %release License: GPL or Artistic Group: Networking/Other URL: http://www.rrdbrowse.org/ Source0: %name-%version.tar.bz2 Source1: %{name}-crontab.bz2 BuildRoot: %_tmppath/%name--buildroot BuildArch: noarch Requires: perl Requires: rrdtool Requires: mrtg Requires: perl-libwww-perl Requires: perl-CGI Requires: perl-Magick BuildRequires: perl-Magick BuildRequires: perl-devel # Note it will whine about missing dependencies during the build # They do not have to be there for the build, only at install time # Thus the lack of a buildrequires %description RDBrowse is a poller daemon, templater and webinterface for rrdtool. It has a sort of threaded daemon which periodically runs from cron. It works with small .nfo files which hold router information and optionally connection details, colors, min max, bandwidth settings, etc, etc. RRDBrowse uses a small caching mechanism to store interface names. It's much MRTG like in it's current state. %prep %setup -q # "patch" the conf file that comes with it to suit our purposes. %{__perl} -pi'.bak' -e 's#/usr/local/etc#/var/www#g; s#(^(?:base|nfo|png|rrd|page|cache)path\s*=.*)$#$1/#; s#(title\s*=\s*)Chiparus\s*#$1#; s#(group\s*=\s*).*$#$1apache#' rrdbrowse.conf %build %{__perl} Makefile.PL INSTALLDIRS=vendor PREFIX=%{_prefix} %make %install %{__rm} -rf $RPM_BUILD_ROOT %makeinstall PREFIX=$RPM_BUILD_ROOT%{_prefix} %{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d %{__install} -m644 rrdbrowse.conf $RPM_BUILD_ROOT%{_sysconfdir} %{__bzip2} -dc %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name} %{__chmod} 644 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name} %{__install} -d -m755 $RPM_BUILD_ROOT%{_var}/www/rrdbrowse %{__install} -d -m750 $RPM_BUILD_ROOT%{_var}/www/rrdbrowse/nfos %{__install} -d -m755 $RPM_BUILD_ROOT%{_var}/www/rrdbrowse/pages %{__install} -d -m775 $RPM_BUILD_ROOT%{_var}/www/rrdbrowse/rrds %{__install} -d -m775 $RPM_BUILD_ROOT%{_var}/www/rrdbrowse/pngs %{__install} -d -m755 $RPM_BUILD_ROOT%{_var}/www/rrdbrowse/cache %{__install} -d $RPM_BUILD_ROOT%{_var}/www/cgi-bin %{__install} -m755 cgi-bin/rb.cgi $RPM_BUILD_ROOT%{_var}/www/cgi-bin %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc Changes README README.Modules examples docs contrib %{_bindir}/rbclean %{_bindir}/rbtest %{_bindir}/rbupdate %dir %{perl_vendorlib}/RRD %{perl_vendorlib}/RRD/* %dir %{_var}/www/rrdbrowse %attr(-,root,apache) %dir %{_var}/www/rrdbrowse/nfos %attr(-,root,apache) %dir %{_var}/www/rrdbrowse/pages %attr(-,root,apache) %dir %{_var}/www/rrdbrowse/rrds %attr(-,root,apache) %dir %{_var}/www/rrdbrowse/pngs %attr(-,root,apache) %dir %{_var}/www/rrdbrowse/cache %{_var}/www/cgi-bin/rb.cgi %config(noreplace) %{_sysconfdir}/cron.d/%{name} %config(noreplace) %{_sysconfdir}/rrdbrowse.conf %{_mandir}/man1/rbclean.1* %{_mandir}/man1/rbtest.1* %{_mandir}/man1/rbupdate.1* %changelog * Wed Sep 10 2003 Ben Reser <ben@reser.org> 1.6-2mdk - BuildReq perl-devel (courtesy of slbd) * Fri Aug 29 2003 Ben Reser <ben@reser.org> 1.6-1mdk - Initial Mandrake package