Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37404967
en ru br
Репозитории ALT
S:1.2.24-alt1
5.1: 0.8.7b-alt4
4.1: 0.8.7b-alt2
4.0: 0.8.6j-alt1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: cacti

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

%define username cacti
%define groupname apache
Name: cacti
Version: 0.8.7b
Release: alt4
%define version_plugin %version-PA-v2.0

Summary: The complete RRDTool-based graphing solution.
Summary(ru_RU.UTF8): п÷п╬п╩п╫п╬я└я┐п╫п╨я├п╦п╬п╫п╟п╩я▄п╫п╟я▐ п╬п╠п╬п╩п╬я┤п╨п╟ п╢п╩я▐ RRDTool.

License: GPL
Group: Monitoring

URL: http://www.cacti.net/
Source0: http://www.cacti.net/downloads/%name-%version.tar.gz
Source1: http://cactiusers.org/downloads/%name-plugin-arch.tar.gz
Source2: %name-readme.alt
Patch1: %name-%version-upgrade_from_086k_fix.patch
Patch2: %name-%version-snmp_auth_none_notice.patch
Patch3: %name-%version-reset_each_patch.patch
Requires: %name-config = %version-%release webserver rrd-utils net-snmp net-snmp-utils
BuildArch: noarch

%define apache_home %_var/www/html

Prefix: %apache_home

%description
Cacti is a complete frontend to RRDTool. It stores all of the necessary
information to create graphs and populate them with data in a MySQL database.
The frontend is completely PHP driven. Along with being able to maintain graphs,
data sources, and round robin archives in a database, Cacti also handles the data
gathering. There is SNMP support for those used to creating traffic graphs with
MRTG.

%description -l ru_RU.UTF8
Cacti - я█я┌п╬ п©п╬п╩п╫п╬я└я┐п╫п╨я├п╦п╬п╫п╟п╩я▄п╫п╟я▐ п╬п╠п╬п╩п╬я┤п╨п╟ п╢п╩я▐ RRDTool. п÷я─п╬пЁя─п╟п╪п╪п╟ я┘я─п╟п╫п╦я┌ п╡я│я▌
п╫п╣п╬п╠я┘п╬п╢п╦п╪я┐я▌ п╦п╫я└п╬я─п╪п╟я├п╦я▌ п╢п╩я▐ я│п╬п╥п╢п╟п╫п╦я▐ п╦ п╫п╟п©п╬п╩п╫п╣п╫п╦я▐ пЁя─п╟я└п╦п╨п╬п╡ п╡ п╠п╟п╥п╣ MySQL.
п÷я─п╬пЁя─п╟п╪п╪п╟ п©п╬п╩п╫п╬я│я┌я▄я▌ п╫п╟п©п╦я│п╟п╫п╟ п╫п╟ PHP. п▓п╪п╣я│я┌п╣ я│ п╡п╬п╥п╪п╬п╤п╫п╬я│я┌я▄я▌ я┐п©я─п╟п╡п╩п╣п╫п╦я▐
пЁя─п╟я└п╦п╨п╟п╪п╦, п╦я│я┌п╬я┤п╫п╦п╨п╟п╪п╦ п╢п╟п╫п╫я▀я┘ п╦ п╟я─я┘п╦п╡п╟п╪п╦ round robin Cacti я┌п╟п╨п╤п╣ п╥п╟п╫п╦п╪п╟п╣я┌я│я▐
я│п╠п╬я─п╬п╪ п╢п╟п╫п╫я▀я┘.

%package config-php
License: GPL
Group: Monitoring
Summary: Virtual package for php's depend.
Requires: php-snmp php-sockets php-mysql
Conflicts: %name-config-php5
Provides: %name-config = %version-%release
%description config-php
Virtual package for php's depend.

%package config-php5
License: GPL
Group: Monitoring
Summary: Virtual package for php's depend.
Requires: php5-snmp php5-sockets php5-mysql
Conflicts: %name-config-php
Provides: %name-config = %version-%release
%description config-php5
Virtual package for php5's depend.

%package doc
Summary: Documentation for %name
Group: Documentation
BuildArch: noarch

%description doc
Documentation for %name

%prep
%setup -q

# add official patches

%patch1 -p1
%patch2 -p1
%patch3 -p1

# add cacti-plugin-arch

%__tar xfz %SOURCE1
patch -p1 -N < cacti-plugin-arch/cacti-plugin-%version_plugin.diff
sed -i /\$config\ =/a\$url_path\ \=\ \"\/cacti\/\"\; include/global.php

%build

#Add sql to one script

cat cacti.sql cacti-plugin-arch/pa.sql > cacti_all.sql
mv -f cacti_all.sql cacti.sql

%install -n %name-%version
%__mkdir_p %buildroot%_bindir
%__mkdir_p %buildroot%_sysconfdir
%__mkdir_p %buildroot%apache_home/%name/
%__mkdir_p %buildroot%apache_home/%name/log
%__mkdir_p %buildroot%apache_home/%name/plugins

%__cp -f *.php README LICENSE cacti.sql %buildroot%apache_home/%name/
%__cp -fR images/ %buildroot%apache_home/%name/
%__cp -fR include/ %buildroot%apache_home/%name/
%__cp -fR install/ %buildroot%apache_home/%name/
%__cp -fR lib/ %buildroot%apache_home/%name/
#%__cp -fR log/ %buildroot%apache_home/%name/
%__cp -fR resource/ %buildroot%apache_home/%name/
%__cp -fR rra/ %buildroot%apache_home/%name/
%__cp -fR scripts/ %buildroot%apache_home/%name/
%__cp %SOURCE2 docs/README_ALT.txt
ln -sf %_docdir/%name-doc-%version %buildroot%apache_home/%name/docs

find %buildroot -type d -exec chmod 0755 {} \;
find %buildroot -type f -exec chmod 0644 {} \;
find %buildroot%apache_home/%name/scripts/ -type f -exec chmod 0755 {} \;

# install cron

%__mkdir_p %buildroot%_sysconfdir/cron.d
%__cat << EOF > %buildroot%_sysconfdir/cron.d/cacti
*/5 * * * * cacti php /var/www/html/cacti/poller.php > /dev/null 2>&1
EOF

%pre
useradd -M -d %apache_home/%name/ -r %username -G %groupname > /dev/null 2>&1 || true

%post
%post_service crond

%files
%config(noreplace) %attr(0640,%username,%groupname) %apache_home/%name/include/config.php
%config %attr(0644,root,root) %_sysconfdir/cron.d/cacti
%doc docs/README_ALT.txt docs/CHANGELOG docs/README docs/REQUIREMENTS docs/UPGRADE docs/CONTRIB
%attr(-,%username,%groupname) %apache_home/%name/
%dir %attr(0775,%username,%groupname) %apache_home/%name/log
%dir %attr(0775,%username,%groupname) %apache_home/%name/rra

##%exclude %apache_home/%name/docs


##files config-php


%files config-php5

%files doc
%doc docs/html/* docs/text/*
##%apache_home/%name/docs

%changelog

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

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin