Группа :: Мониторинг
Пакет: ntop
Главная Изменения Спек Патчи Загрузить Bugs and FR
%define groupadd groupadd
%define useradd useradd
%define userremove userremove
%define groupremove groupremove
# $Revision: 1.67 $, $Date: 2005/05/19 10:13:09 $
# TODO:
# - service ntop init steals terminal (it doesnt finish nor background)
# - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
# - /var/lib/ntop/* should be %ghost
# - .la files should be in -devel
# - ntop apperars to be daemon, so it should be in _sbindir not in _bindir
#
Summary: Network monitoring tool
Summary(pl): NarzЙdzie do monitorowania sieci
Summary(ru_RU.KOI8-R): Инструмент мониторинга сети
Summary(ru_RU.CP1251): хМЯРПСЛЕМР ЛНМХРНПХМЦЮ ЯЕРХ
Name: ntop
Version: 3.2
Release: alt0.M24.0.1
License: GPL
Group: Monitoring
Packager: Anton Korbin <ahtoh at altlinux.ru>
Url: http://www.ntop.org/
Source: http://dl.sf.net/%name/%name-%version.tar.bz2
# Source0-md5: 1c9b4097c2e464b84f2fe8f6626d2b06
Source1: %name.init
Source2: %name.conf
Patch0: %name-plugins_makefile.patch
#Patch1: %name-conf.patch
#Patch2: %name-DESTDIR.patch
#Patch3: %name-nolibs.patch
%set_verify_elf_method textrel=relaxed
%define _localstatedir /var/lib/ntop
# Automatically added by buildreq on Wed Nov 02 2005
BuildRequires: fontconfig freetype2 gcc-c++ glib-devel libgd2-devel libgdbm-devel libpam-devel libpcap-devel libpng-devel libssl-devel libstdc++-devel libwrap-devel libxml2-devel XFree86-devel zlib-devel
%description
ntop is a tool that shows the network usage, similar to what the
popular top Unix command does.
%description -l pl
ntop to narzЙdzie, ktСre pokazuje u©ycie sieci w podobny sposСb jak
robi to popularna uniksowa komenda top.
%description -l ru_RU.KOI8-R
ntop это программа мониторинга сетевых интерфейсов с поддержкой графики
и собственным web-сервером. Чем-то напоминает mrtg.
%description -l ru_RU.CP1251
ntop ЩРН ОПНЦПЮЛЛЮ ЛНМХРНПХМЦЮ ЯЕРЕБШУ ХМРЕПТЕИЯНБ Я ОНДДЕПФЙНИ ЦПЮТХЙХ
Х ЯНАЯРБЕММШЛ web-ЯЕПБЕПНЛ. вЕЛ-РН МЮОНЛХМЮЕР mrtg.
%prep
%setup -q -n %name-%version
%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
# kill libtool.m4 copy
cp -f acinclude.m4.ntop acinclude.m4
%build
autoreconf -fisv
# "verified.awk -u" calls require gawk
%configure \
AWK=gawk \
--disable-static \
--enable-i18n \
--with-gnu-ld \
--with-ossl-root=%prefix \
--with-tcpwrap
%__make
%install
install -d %buildroot{%_localstatedir,/etc/{rc.d/init.d,sysconfig}}
%make_install install DESTDIR=%buildroot
install %SOURCE1 %buildroot/etc/rc.d/init.d/ntop
#install %SOURCE2 %buildroot/etc/sysconfig/ntop
install %SOURCE2 %buildroot/etc/ntop/ntop.conf
mv %buildroot%_libdir/lib*Plugin*.so %buildroot%_libdir/%name/plugins
%pre
%groupadd -r -f ntop || :
%useradd -M -r -d %_localstatedir -s /bin/false -c "ntop User" -g ntop ntop || :
%__mkdir -p %_localstatedir/ntop
%post
%post_service %name
%post_ldconfig
#if test "$1" = "0"; then
echo "***********************************************************************"
echo "* YOU MUST SETUP A PASSWORD BEFORE RUNNING NTOP *"
echo "* *"
echo "* (as root run) $ /usr/bin/ntop -A *"
echo "* *"
echo "* see 1STRUN.txt in /usr/share/doc/ntop-<release> *"
echo "* You can configure /etc/ntop/ntop.conf *"
echo "* *"
echo "***********************************************************************"
#fi
%preun
%preun_service %name
%postun
%postun_ldconfig
%files
%doc AUTHORS ChangeLog NEWS README THANKS
%doc www docs NetFlow utils
%attr(770,root,ntop) %dir %_localstatedir
%attr(770,root,ntop) %dir %_localstatedir/ntop
%attr(755,root,root) %_bindir/*
%_libdir/lib*
%_datadir/%name
%dir %_libdir/%name
%_libdir/%name/plugins
%_mandir/man*/*
%attr(754,root,root) /etc/rc.d/init.d/ntop
#%attr(640,root,root) /etc/sysconfig/ntop
%attr(750,root,ntop) %dir /etc/ntop
%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop/*
#%attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop.conf
%changelog
…
Полный changelog можно просмотреть здесь
%define useradd useradd
%define userremove userremove
%define groupremove groupremove
# $Revision: 1.67 $, $Date: 2005/05/19 10:13:09 $
# TODO:
# - service ntop init steals terminal (it doesnt finish nor background)
# - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
# - /var/lib/ntop/* should be %ghost
# - .la files should be in -devel
# - ntop apperars to be daemon, so it should be in _sbindir not in _bindir
#
Summary: Network monitoring tool
Summary(pl): NarzЙdzie do monitorowania sieci
Summary(ru_RU.KOI8-R): Инструмент мониторинга сети
Summary(ru_RU.CP1251): хМЯРПСЛЕМР ЛНМХРНПХМЦЮ ЯЕРХ
Name: ntop
Version: 3.2
Release: alt0.M24.0.1
License: GPL
Group: Monitoring
Packager: Anton Korbin <ahtoh at altlinux.ru>
Url: http://www.ntop.org/
Source: http://dl.sf.net/%name/%name-%version.tar.bz2
# Source0-md5: 1c9b4097c2e464b84f2fe8f6626d2b06
Source1: %name.init
Source2: %name.conf
Patch0: %name-plugins_makefile.patch
#Patch1: %name-conf.patch
#Patch2: %name-DESTDIR.patch
#Patch3: %name-nolibs.patch
%set_verify_elf_method textrel=relaxed
%define _localstatedir /var/lib/ntop
# Automatically added by buildreq on Wed Nov 02 2005
BuildRequires: fontconfig freetype2 gcc-c++ glib-devel libgd2-devel libgdbm-devel libpam-devel libpcap-devel libpng-devel libssl-devel libstdc++-devel libwrap-devel libxml2-devel XFree86-devel zlib-devel
%description
ntop is a tool that shows the network usage, similar to what the
popular top Unix command does.
%description -l pl
ntop to narzЙdzie, ktСre pokazuje u©ycie sieci w podobny sposСb jak
robi to popularna uniksowa komenda top.
%description -l ru_RU.KOI8-R
ntop это программа мониторинга сетевых интерфейсов с поддержкой графики
и собственным web-сервером. Чем-то напоминает mrtg.
%description -l ru_RU.CP1251
ntop ЩРН ОПНЦПЮЛЛЮ ЛНМХРНПХМЦЮ ЯЕРЕБШУ ХМРЕПТЕИЯНБ Я ОНДДЕПФЙНИ ЦПЮТХЙХ
Х ЯНАЯРБЕММШЛ web-ЯЕПБЕПНЛ. вЕЛ-РН МЮОНЛХМЮЕР mrtg.
%prep
%setup -q -n %name-%version
%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
# kill libtool.m4 copy
cp -f acinclude.m4.ntop acinclude.m4
%build
autoreconf -fisv
# "verified.awk -u" calls require gawk
%configure \
AWK=gawk \
--disable-static \
--enable-i18n \
--with-gnu-ld \
--with-ossl-root=%prefix \
--with-tcpwrap
%__make
%install
install -d %buildroot{%_localstatedir,/etc/{rc.d/init.d,sysconfig}}
%make_install install DESTDIR=%buildroot
install %SOURCE1 %buildroot/etc/rc.d/init.d/ntop
#install %SOURCE2 %buildroot/etc/sysconfig/ntop
install %SOURCE2 %buildroot/etc/ntop/ntop.conf
mv %buildroot%_libdir/lib*Plugin*.so %buildroot%_libdir/%name/plugins
%pre
%groupadd -r -f ntop || :
%useradd -M -r -d %_localstatedir -s /bin/false -c "ntop User" -g ntop ntop || :
%__mkdir -p %_localstatedir/ntop
%post
%post_service %name
%post_ldconfig
#if test "$1" = "0"; then
echo "***********************************************************************"
echo "* YOU MUST SETUP A PASSWORD BEFORE RUNNING NTOP *"
echo "* *"
echo "* (as root run) $ /usr/bin/ntop -A *"
echo "* *"
echo "* see 1STRUN.txt in /usr/share/doc/ntop-<release> *"
echo "* You can configure /etc/ntop/ntop.conf *"
echo "* *"
echo "***********************************************************************"
#fi
%preun
%preun_service %name
%postun
%postun_ldconfig
%files
%doc AUTHORS ChangeLog NEWS README THANKS
%doc www docs NetFlow utils
%attr(770,root,ntop) %dir %_localstatedir
%attr(770,root,ntop) %dir %_localstatedir/ntop
%attr(755,root,root) %_bindir/*
%_libdir/lib*
%_datadir/%name
%dir %_libdir/%name
%_libdir/%name/plugins
%_mandir/man*/*
%attr(754,root,root) /etc/rc.d/init.d/ntop
#%attr(640,root,root) /etc/sysconfig/ntop
%attr(750,root,ntop) %dir /etc/ntop
%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop/*
#%attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop.conf
%changelog
…
Полный changelog можно просмотреть здесь