Репозиторий Sisyphus
Последнее обновление: 14 октября 2019 | Пакетов: 17518 | Посещений: 15267787
en ru br
Репозитории ALT
S:2.17.3-alt1
5.1: 2.16.3-alt1
4.1: 2.14.7-alt1
4.0: 2.14.7-alt1
3.0: 2.12.2-alt1
www.altlinux.org/Changes

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

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

Name: mrtg
Version: 2.12.2
Release: alt1

Summary: Multi Router Traffic Grapher
Group: Monitoring
License: GPL / LGPL
Url: http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/

Packager: Andrei Bulava <abulava at altlinux.ru>

Source0: http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/%name-%version.tar.gz
Source1: mrtg.cfg
Source2: 14all.cgi
Source3: README-14allcgi
Source4: mrtg.cron.d
Source5: mrtg.iptables
Source6: mrtg-lo0.cfg
Source7: mrtg.cpuinfo
Source8: README.ALT-ru_RU.KOI8-R
PreReq: sysstat

# Automatically added by buildreq on Mon Dec 27 2004 (-bi)

BuildRequires: fontconfig freetype2-devel groff-base hostinfo libgd2-devel libjpeg-devel libpng-devel perl-CGI perl-Math-BigInt xorg-x11-libs zlib-devel

%description
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic
load on network-links. MRTG generates HTML pages containing GIF or PNG
images which provide a LIVE visual representation of this traffic.

%description -l ru_RU.KOI8-R
MRTG - инструмент для мониторинга загрузки сетевых интерфейсов, генерирующий
HTML-страницы с графикой, предоставляющие "живую" визуализацию трафика.

%description -l uk_UA.KOI8-U
MRTG - ╕нструмент для мон╕торингу завантаження мережевих ╕нтерфейс╕в,
який генеру╓ HTML-стор╕нки ╕з граф╕кою, що надають "живу" в╕зуал╕зац╕ю
траф╕ку.

%package contrib
Summary: Multi Router Traffic Grapher - contribs
Group: Monitoring
AutoReq: no
Requires: %name = %version-%release

%description contrib
Scripts in contrib/ directory of MRTG source distribution

%define _contentdir /var/www/html/%name
%define _libmrtg %_libexecdir/%{name}2

%define _perl_lib_path %_libmrtg
%add_findprov_skiplist */Pod/*
%add_findprov_skiplist */contrib/*
%add_findprov_skiplist */helpers/*

%prep
%setup -q
echo "Removing .orig's..."
find . -name "*.orig" -print0 -exec rm -f \{\} \; \
> /dev/null

%__cp -p %SOURCE8 .

%build
%configure
%make_build

find contrib -type f -print0 -exec %__perl -pi \
-e 's;^#!/.*/perl.*;#!/usr/bin/perl;gi' \{\} \; \
> /dev/null

find contrib -type f -print0 -exec %__perl -pi \
-e 's;/usr/local/bin/;/usr/bin/;gi' \{\} \; \
> /dev/null

find contrib -type f -print0 -exec %__perl -pi \
-e 's;/usr/local/mrtg/(bin/)?mrtg;/usr/bin/mrtg;gi' \{\} \; \
> /dev/null

find . -name "*.pl" -print0 -exec %__perl -pi -e 's;\015;;gi' \{\} \; \
> /dev/null

#tar -cf - contrib | gzip -9nf > contrib.tar.gz


%install
%__mkdir -p %buildroot{%_sysconfdir/%name,%_sysconfdir/cron.d,%_man1dir,%_bindir,%_contentdir/images,%_contentdir/docs,/var/www/cgi-bin,%_libmrtg/Pod,%_libmrtg/helpers,%_localstatedir/%name}

%__install -m 644 images/*   %buildroot%_contentdir/images
%__install -m 644 doc/*.html %buildroot%_contentdir/docs
%__install -m 644 %SOURCE1 %buildroot%_sysconfdir/%name
%__install -m 755 %SOURCE2 %buildroot/var/www/cgi-bin
%__install -m 644 %SOURCE3 %buildroot%_contentdir/docs
%__install -m 640 %SOURCE4 %buildroot%_sysconfdir/cron.d/%name

%__install -m 755 %SOURCE5 %buildroot/%_libmrtg/helpers/iptables-accounting.pl
%__install -m 644 %SOURCE6 %buildroot%_sysconfdir/%name
%__install -m 755 %SOURCE7 %buildroot/%_libmrtg/helpers/cpuinfo.pl

%__cp -r contrib %buildroot%_libmrtg/

for i in %buildroot%_contentdir/images/*; do
%__ln_s ../images/`basename $i` %buildroot%_contentdir/docs
done

for i in bin/{mrtg,rateup,cfgmaker,indexmaker}; do
%__install -m 755 -c $i %buildroot%_bindir/
done

for i in lib/mrtg2/*.pm; do
%__install -m 644 $i %buildroot%_libmrtg/
done

for i in lib/mrtg2/Pod/*.pm; do
%__install -m 644 $i %buildroot%_libmrtg/Pod/
done

for i in doc/*.1; do
%__install -m 644 $i %buildroot%_man1dir/
done

%pre
/usr/sbin/groupadd -r -f %name &> /dev/null ||:
/usr/sbin/useradd -r -g %name -d /dev/null -s /dev/null -n %name &> /dev/null ||:

%post
# work around perms problems after mrtg reinstallation
find %_sysconfdir/%name %_contentdir -nouser -print0 -exec %__chown %name \{\} \; \
> /dev/null

%triggerpostun -- %name <= 2.9.29-alt1
# work around update problem caused by POSTUN script deleting user 'mrtg'
/usr/sbin/groupadd -r -f %name &> /dev/null ||:
/usr/sbin/useradd -r -g %name -d /dev/null -s /dev/null -n %name &> /dev/null ||:

find %_sysconfdir/%name %_contentdir -nouser -print0 -exec %__chown %name \{\} \; \
> /dev/null

%files
%doc ANNOUNCE CHANGES COPYING COPYRIGHT MANIFEST README README.ALT-ru_RU.KOI8-R

%config(noreplace) %_sysconfdir/%name/mrtg*.cfg
%config(noreplace) %attr(640,root,root) %_sysconfdir/cron.d/%name
%dir %attr(770,mrtg,mrtg) %_sysconfdir/%name
%dir %attr(755,mrtg,webmaster) %_contentdir
%dir %attr(775,mrtg,mrtg) %_localstatedir/%name
%dir %_libmrtg
%dir %_libmrtg/Pod
%dir %_libmrtg/helpers

%_contentdir/docs/*
%_contentdir/images/*
/var/www/cgi-bin/14all.cgi
%_man1dir/indexmaker*.1*
%_man1dir/cfgmaker*.1*
%_man1dir/mrtg*.1*
%_bindir/*
%_libmrtg/*.pm
%_libmrtg/Pod/*
%_libmrtg/helpers/*

%files contrib
%dir %_libmrtg/contrib
%_libmrtg/contrib/*

%changelog

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

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