]> git.pld-linux.org Git - packages/ntop.git/blame_incremental - ntop.spec
- release 6 (by relup.sh)
[packages/ntop.git] / ntop.spec
... / ...
CommitLineData
1# TODO
2# - see if it uses system files for ettercap and geoip, ieee-oui files we did not package
3# - see where plugins are needed in plugin dir or in system dir
4# - unpackaged
5# /etc/ntop/GeoIPASNum.dat
6# /etc/ntop/GeoLiteCity.dat
7# /usr/lib64/libntop.a
8# /usr/lib64/libntopreport.a
9# NOTE: can read oui.txt.xz if MAKE_WITH_ZLIB enabled
10#
11# Conditional build:
12%bcond_with mysql # with mysql support
13
14Summary: Network monitoring tool
15Summary(pl.UTF-8): Narzędzie do monitorowania sieci
16Name: ntop
17Version: 5.0.1
18Release: 6
19License: GPL v3+
20Group: Networking
21Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tar.gz
22# Source0-md5: 01710b6925a8a5ffe1a41b8b512ebd69
23Source1: %{name}.init
24Source2: %{name}.sysconfig
25# http://ettercap.cvs.sourceforge.net/ettercap/ettercap_ng/share/etter.finger.os?rev=HEAD
26Source3: etter.finger.os
27Patch0: %{name}-conf.patch
28Patch1: %{name}-config.patch
29Patch2: %{name}-am.patch
30Patch3: %{name}-lua_wget.patch
31Patch4: %{name}-http_c.patch
32Patch5: %{name}-running-user.patch
33Patch6: ieee-oui.patch
34Patch7: %{name}-install.patch
35Patch8: %{name}-rrdtool-1.6.0.patch
36Patch9: ac-am.patch
37URL: http://www.ntop.org/
38BuildRequires: GeoIP-devel
39BuildRequires: autoconf
40BuildRequires: automake >= 1.6
41BuildRequires: gawk
42BuildRequires: gd-devel >= 2.0.1
43BuildRequires: gdbm-devel >= 1.8.3
44BuildRequires: gdome2-devel
45BuildRequires: glib2-devel
46BuildRequires: libdbi-devel
47BuildRequires: libevent-devel >= 1.4.0
48BuildRequires: libpcap-devel
49BuildRequires: libpng-devel
50BuildRequires: libtiff-devel
51BuildRequires: libtool
52BuildRequires: libwrap-devel
53BuildRequires: lua51-devel
54BuildRequires: ncurses-devel >= 5.2
55BuildRequires: net-snmp-devel
56BuildRequires: openssl-devel >= 0.9.7d
57BuildRequires: perl-devel
58BuildRequires: readline-devel >= 4.2
59BuildRequires: rpm-pythonprov
60BuildRequires: rpmbuild(macros) >= 1.268
61BuildRequires: rrdtool-devel >= 1.1.0
62BuildRequires: sed >= 4.0
63BuildRequires: zlib-devel
64Requires(post,postun): /sbin/ldconfig
65Requires(post,preun): /sbin/chkconfig
66Requires(postun): /usr/sbin/groupdel
67Requires(postun): /usr/sbin/userdel
68Requires(pre): /bin/id
69Requires(pre): /usr/bin/getgid
70Requires(pre): /usr/sbin/groupadd
71Requires(pre): /usr/sbin/useradd
72Requires: hwdata >= 0.243-2
73Requires: rc-scripts >= 0.4.2.8
74# maybe is optional, needs checking
75Suggests: GeoIP-db-City
76Suggests: GeoIP-db-IPASNum
77Suggests: ettercap
78Provides: group(ntop)
79Provides: user(ntop)
80BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81
82%define _localstatedir /var/lib
83
84%description
85ntop is a tool that shows the network usage, similar to what the
86popular top Unix command does.
87
88%description -l pl.UTF-8
89ntop to narzędzie, które pokazuje użycie sieci w podobny sposób jak
90robi to popularna uniksowa komenda top.
91
92%prep
93%setup -q
94%patch0 -p1
95%patch1 -p1
96%patch2 -p1
97%patch3 -p1
98%patch4 -p1
99%patch5 -p1
100%patch6 -p1
101%patch7 -p1
102%patch8 -p1
103%patch9 -p1
104
105gzip -9c %{SOURCE3} >etter.finger.os.gz
106
107# taken from autogen.sh
108cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
109cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
110
111%build
112%{__libtoolize}
113%{__aclocal}
114%{__autoconf}
115%{__autoheader}
116%{__automake}
117
118cd nDPI
119%configure
120%{__make}
121cd ..
122
123# "verified.awk -u" calls require gawk
124%configure \
125 AWK=gawk \
126 --disable-static \
127 --with-gnu-ld \
128 --with-ossl-root=%{_prefix} \
129 --with-tcpwrap \
130 --enable-snmp \
131 %{?with_mysql:--enable-mysql}
132
133%{__make}
134
135%install
136rm -rf $RPM_BUILD_ROOT
137install -d $RPM_BUILD_ROOT{%{_localstatedir}/ntop/rrd,/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
138
139%{__make} install \
140 GEOIP_FILES= \
141 OUI_FILES= \
142 ETTER_PASSIVE= \
143 DESTDIR=$RPM_BUILD_ROOT
144
145install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
146cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
147cp -a packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
148
149# these are identical files according to find-debuginfo
150for p in icmpPlugin lastSeenPlugin netflowPlugin cpacketPlugin rrdPlugin sflowPlugin; do
151 ln -snf ../../lib$p-%{version}.so $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/$p.so
152done
153
154# read by checkForInputFile() scanning various dirs and extensions
155ln -s /lib/hwdata/oui.txt $RPM_BUILD_ROOT%{_sysconfdir}/ntop/oui.txt
156
157# no -devel
158rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
159
160%clean
161rm -rf $RPM_BUILD_ROOT
162
163%pre
164%groupadd -g 120 ntop
165%useradd -u 120 -d %{_localstatedir}/ntop -s /bin/false -c "ntop User" -g ntop ntop
166
167%post
168/sbin/ldconfig
169/sbin/chkconfig --add ntop
170%service ntop restart "ntop daemon"
171
172%preun
173if [ "$1" = "0" ]; then
174 %service ntop stop
175 /sbin/chkconfig --del ntop
176fi
177
178%postun
179/sbin/ldconfig
180if [ "$1" = "0" ]; then
181 %userremove ntop
182 %groupremove ntop
183fi
184
185%files
186%defattr(644,root,root,755)
187%doc AUTHORS ChangeLog NEWS README THANKS docs/{1STRUN.txt,FAQ}
188%attr(750,root,ntop) %dir %{_sysconfdir}/ntop
189%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/ntop-cert.pem
190%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/oui.txt
191%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/specialMAC.txt.gz
192%attr(660,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop.conf
193%attr(754,root,root) /etc/rc.d/init.d/ntop
194%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntop
195%attr(755,root,root) %{_sbindir}/ntop
196%attr(755,root,root) %{_libdir}/lib*.so
197%attr(755,root,root) %{_datadir}/%{name}
198%dir %{_libdir}/%{name}
199%attr(755,root,root) %{_libdir}/%{name}/plugins
200%{_mandir}/man8/ntop.8*
201
202%attr(770,root,ntop) %dir %{_localstatedir}/ntop
203%attr(770,root,ntop) %dir %{_localstatedir}/ntop/rrd
This page took 0.028376 seconds and 4 git commands to generate.