Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1492922
 поиск   регистрация   авторизация 
 
Группа :: Мониторинг
Пакет: collectd

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

# mysql4 and apache1 seem problematic right now
# mysql5 OK
%def_without apache
%def_with cgi
%def_without mysql
%def_with sensors

Name: collectd
Version: 3.9.1
Release: alt0.M24.1

Summary: Statistics collection daemon for filling RRD files
License: GPL
Group: Monitoring

Url: http://verplant.org/collectd
Source0: %url/%name-%version.tar.bz2
Source1: %name.init
Patch0: collectd-3.9.0-alt-hddtemp.patch
Packager: Michael Shigorin <mike at altlinux.org>

Requires: rrdtool

# Automatically added by buildreq on Fri Apr 21 2006 (-bi)

BuildRequires: freetype2 gcc-c++ glibc-devel-static hostinfo librrd-devel libstdc++-devel python-base python-modules-compiler python-modules-encodings rpm-build-python rrd-perl

BuildRequires: kernel-headers-std

%if_with apache
BuildRequires: apache-devel
%endif

%if_with cgi
BuildRequires: perl-CGI apache-devel
%endif

%if_with mysql
BuildRequires: libMySQL-devel
%endif

%if_with sensors
BuildRequires: libsensors-devel
%endif

%description
collectd is a small daemon written in C for performance. It reads various
system statistics and updates RRD files, creating them if neccessary.
Since the daemon doesn't need to startup every time it wants to update the
files it's very fast and easy on the system. Also, the statistics are very
fine grained since the files are updated every 10 seconds.

%if_with cgi
%package cgi
Summary: CGI script for collectd
Group: Monitoring
Requires: collectd = %version
Requires: apache-common

%description cgi
This CGI frontend for collectd allows to browse the stats online

WARNING: you might want to restrict access, there's no additional
restriction by default [yet]!
%endif

%if_with mysql
%package mysql
Summary: MySQL support module for collectd
Group: Monitoring
Requires: collectd = %version
Requires: libMySQL

%description mysql
This plugin for collectd provides querying of MySQL server
%endif

%if_with sensors
%package sensors
Summary: lm_sensors support module for collectd
Group: Monitoring
Requires: collectd = %version
Requires: lm_sensors

%description sensors
This plugin for collectd provides querying of sensors supported
by lm_sensors
%endif


%prep
%setup
%patch -p1


%build
CONFFLAGS="--disable-apple_sensors"

%if_without apache
CONFFLAGS="$CONFFLAGS --disable-apache"
%endif

%if_without mysql
CONFFLAGS="$CONFFLAGS --disable-mysql"
%endif

%if_without sensors
CONFFLAGS="$CONFFLAGS --disable-sensors"
%endif

%configure $CONFFLAGS
%make


%install
%make_install DESTDIR=%buildroot install
install -pD -m644 contrib/collectd.conf %buildroot%_sysconfdir/%name.conf
install -pD -m755 %SOURCE1 %buildroot%_initdir/%name
install -d %buildroot%_libdir/%name/ %buildroot%_localstatedir/%name/
rm -f %buildroot%_libdir/%name/*.a
rm -f %buildroot%_libdir/%name/*.la

%if_with cgi
install -pD -m755 contrib/collection.cgi %buildroot%apache_cgibindir/collection.cgi
%endif


%files
%doc AUTHORS ChangeLog README TODO
%doc contrib/
%config %_sysconfdir/%name.conf
%_initdir/%name
%_sbindir/%name
%_man1dir/*.1*
%_man5dir/*.5*
%dir %_libdir/%name/
%dir %_localstatedir/%name/
%_libdir/%name/*.so*

%if_with sensors
%exclude %_libdir/%name/sensors.so*
%endif

%if_with mysql
%exclude %_libdir/%name/mysql.so*
%endif


%if_with cgi
%files cgi
%apache_cgibindir/collection.cgi
%endif

%if_with mysql
%files mysql
%_libdir/%name/mysql.so*
%endif

%if_with sensors
%files sensors
%_libdir/%name/sensors.so*
%endif


# TODO:

# - cgi .htaccess or httpd.conf include
# - apache.c: figure out what's wrong,
#   supposedly they want apache2

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005