Репозитории ALT
S: | 1.2.24-alt1 |
5.1: | 0.8.7b-alt4 |
4.1: | 0.8.7b-alt2 |
4.0: | 0.8.6j-alt1 |
Группа :: Мониторинг
Пакет: cacti
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define username cacti
%define groupname apache
Name: cacti
Version: 0.8.7b
Release: alt2
%define version_plugin %version-PA-v2.0
Summary: The complete RRDTool-based graphing solution.
Summary(ru_RU.CP1251): оНКМНТСМЙЖХНМЮКЭМЮЪ НАНКНВЙЮ ДКЪ 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
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.CP1251
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.
%prep
%setup -q
# add official patches
%patch1 -p1
%patch2 -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-%version/html %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
%postun
# Now policy doesn't allow to delete users
#userdel -M %username > /dev/null 2>&1 || true
%files
%config(noreplace) %attr(0640,%username,%groupname) %apache_home/%name/include/config.php
%config %attr(0644,root,root) %_sysconfdir/cron.d/cacti
%doc docs/*
%attr(-,%username,%groupname) %apache_home/%name/
%dir %attr(0775,%username,%groupname) %apache_home/%name/log
%dir %attr(0775,%username,%groupname) %apache_home/%name/rra
%files config-php
%files config-php5
%changelog
…
Полный changelog можно просмотреть здесь
%define groupname apache
Name: cacti
Version: 0.8.7b
Release: alt2
%define version_plugin %version-PA-v2.0
Summary: The complete RRDTool-based graphing solution.
Summary(ru_RU.CP1251): оНКМНТСМЙЖХНМЮКЭМЮЪ НАНКНВЙЮ ДКЪ 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
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.CP1251
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.
%prep
%setup -q
# add official patches
%patch1 -p1
%patch2 -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-%version/html %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
%postun
# Now policy doesn't allow to delete users
#userdel -M %username > /dev/null 2>&1 || true
%files
%config(noreplace) %attr(0640,%username,%groupname) %apache_home/%name/include/config.php
%config %attr(0644,root,root) %_sysconfdir/cron.d/cacti
%doc docs/*
%attr(-,%username,%groupname) %apache_home/%name/
%dir %attr(0775,%username,%groupname) %apache_home/%name/log
%dir %attr(0775,%username,%groupname) %apache_home/%name/rra
%files config-php
%files config-php5
%changelog
…
Полный changelog можно просмотреть здесь