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