]> git.pld-linux.org Git - packages/ntop.git/blame - ntop.spec
- outdated
[packages/ntop.git] / ntop.spec
CommitLineData
fb745d9b 1# Conditional build
2#
3%bcond_with mysql # with mysql support
4#
3f97aafa 5Summary: Network monitoring tool
e89446b9 6Summary(pl.UTF-8): Narzędzie do monitorowania sieci
3f97aafa 7Name: ntop
fb745d9b 8Version: 3.3.8
9Release: 0.1
3f97aafa 10License: GPL
9eec0d7a 11Group: Networking
d41c3295 12Source0: http://dl.sourceforge.net/ntop/%{name}-%{version}.tar.gz
fb745d9b 13# Source0-md5: 19c6a582c285ffae18bf0c3b599d184e
81772bff 14Source1: %{name}.init
15Source2: %{name}.sysconfig
fb745d9b 16Patch0: %{name}-conf.patch
17Patch1: %{name}-config.patch
18Patch2: %{name}-am.patch
3f97aafa 19URL: http://www.ntop.org/
03329ce3 20BuildRequires: autoconf
fd17b5c4 21BuildRequires: automake >= 1.6
9e8c6481 22BuildRequires: gawk
23c07473 23BuildRequires: gd-devel >= 2.0.1
8aa70f00 24BuildRequires: gdbm-devel >= 1.8.3
26a5ca45
ER
25BuildRequires: gdome2-devel
26BuildRequires: glib2-devel
3f97aafa 27BuildRequires: libpcap-devel
03329ce3 28BuildRequires: libpng-devel
ad718851 29BuildRequires: libtiff-devel
03329ce3 30BuildRequires: libtool
9e8c6481 31BuildRequires: libwrap-devel
75909d05 32BuildRequires: ncurses-devel >= 5.2
6ebc82ab 33BuildRequires: openssl-devel >= 0.9.7d
75909d05 34BuildRequires: readline-devel >= 4.2
e5996737 35BuildRequires: rpmbuild(macros) >= 1.202
411f46d0 36BuildRequires: rpmbuild(macros) >= 1.268
fd17b5c4 37BuildRequires: rrdtool-devel >= 1.1.0
fe6022b1 38BuildRequires: zlib-devel
8005772a
ER
39Requires(post,postun): /sbin/ldconfig
40Requires(post,preun): /sbin/chkconfig
41Requires(postun): /usr/sbin/groupdel
42Requires(postun): /usr/sbin/userdel
31edeabf 43Requires(pre): /bin/id
1b68ade4 44Requires(pre): /usr/bin/getgid
31edeabf
JB
45Requires(pre): /usr/sbin/groupadd
46Requires(pre): /usr/sbin/useradd
fb745d9b 47%{?with_mysql:Requires: mysql}
8005772a 48Requires: rc-scripts
1b68ade4 49Provides: group(ntop)
50Provides: user(ntop)
3f97aafa
AM
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
1dced15e 53%define _localstatedir /var/lib
9e8c6481 54
3f97aafa
AM
55%description
56ntop is a tool that shows the network usage, similar to what the
57popular top Unix command does.
58
66d0b5be
JR
59%description -l pl.UTF-8
60ntop to narzędzie, które pokazuje użycie sieci w podobny sposób jak
5997acdb 61robi to popularna uniksowa komenda top.
3f97aafa
AM
62
63%prep
8005772a 64%setup -q
1db42d64 65%patch0 -p1
32b74bbf 66%patch1 -p1
fb745d9b 67%patch2 -p1
9e8c6481 68
fb745d9b 69# taken from autogen.sh
70cp -f /usr/share/aclocal/libtool.m4 libtool.m4.in
71cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
3f97aafa
AM
72
73%build
9e8c6481 74%{__libtoolize}
8c73db90 75%{__aclocal}
aa754682 76%{__autoconf}
fb745d9b 77%{__autoheader}
5c8a70e7 78%{__automake}
9e8c6481 79# "verified.awk -u" calls require gawk
d4bb730c 80%configure \
9e8c6481
JB
81 AWK=gawk \
82 --disable-static \
fe6022b1 83 --with-gnu-ld \
9e8c6481 84 --with-ossl-root=%{_prefix} \
fb745d9b 85 --with-tcpwrap \
86 %{?with_mysql:--enable-mysql}
8597cd3b 87
593fe373 88%{__make}
3f97aafa
AM
89
90%install
9eec0d7a 91rm -rf $RPM_BUILD_ROOT
1dced15e 92install -d $RPM_BUILD_ROOT{%{_localstatedir}/ntop/rrd,/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
3f97aafa 93
fe6022b1
AM
94%{__make} install \
95 DESTDIR=$RPM_BUILD_ROOT
8597cd3b 96
81772bff 97install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
98install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
8005772a 99install packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
81772bff 100
8005772a
ER
101# no -devel
102rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
c0b31d44 103
3f97aafa 104%clean
215b65a5 105rm -rf $RPM_BUILD_ROOT
3f97aafa 106
94207320 107%pre
e5996737 108%groupadd -g 120 ntop
1dced15e 109%useradd -u 120 -d %{_localstatedir}/ntop -s /bin/false -c "ntop User" -g ntop ntop
94207320 110
ffc5999b 111%post
94207320 112/sbin/ldconfig
113/sbin/chkconfig --add ntop
411f46d0 114%service ntop restart "ntop daemon"
94207320 115
116%preun
117if [ "$1" = "0" ]; then
411f46d0 118 %service ntop stop
b87b7487 119 /sbin/chkconfig --del ntop
94207320 120fi
121
ffc5999b 122%postun
94207320 123/sbin/ldconfig
124if [ "$1" = "0" ]; then
1b68ade4 125 %userremove ntop
126 %groupremove ntop
94207320 127fi
fe6022b1 128
3f97aafa
AM
129%files
130%defattr(644,root,root,755)
fd17b5c4 131%doc AUTHORS ChangeLog NEWS README THANKS docs/{1STRUN.txt,FAQ}
1dced15e
ER
132%attr(770,root,ntop) %dir %{_localstatedir}/ntop
133%attr(770,root,ntop) %dir %{_localstatedir}/ntop/rrd
8005772a
ER
134%attr(755,root,root) %{_sbindir}/*
135%attr(755,root,root) %{_libdir}/lib*.so
2a2238a1 136%attr(755,root,root) %{_datadir}/%{name}
041f4633 137%dir %{_libdir}/%{name}
215b65a5 138%attr(755,root,root) %{_libdir}/%{name}/plugins
3f97aafa 139%{_mandir}/man*/*
31edeabf 140%attr(754,root,root) /etc/rc.d/init.d/ntop
8005772a
ER
141%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntop
142%attr(750,root,ntop) %dir %{_sysconfdir}/ntop
143%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/*
fd17b5c4 144%attr(660,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop.conf
This page took 0.302159 seconds and 4 git commands to generate.