]> git.pld-linux.org Git - packages/ntop.git/blame - ntop.spec
- don't wget passive OS fingerprint database at install time
[packages/ntop.git] / ntop.spec
CommitLineData
1c15e1a3 1# TODO
9d96f8b2 2# - see if it uses system files for ettercap and geoip, ieee-oui files we did not package
f9d989ae 3# - see where plugins are needed in plugin dir or in system dir
a62aca02 4# - fix init script (--redirdfs is bogus?)
fb745d9b 5#
8f8442a4 6# Conditional build:
fb745d9b 7%bcond_with mysql # with mysql support
1c15e1a3 8
3f97aafa 9Summary: Network monitoring tool
e89446b9 10Summary(pl.UTF-8): Narzędzie do monitorowania sieci
3f97aafa 11Name: ntop
f0bbc595 12Version: 4.0.3
a62aca02 13Release: 0.1
14License: GPL v3+
9eec0d7a 15Group: Networking
f0bbc595 16Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tgz
17# Source0-md5: f064393a2090e5bda102cd49c2707789
81772bff 18Source1: %{name}.init
19Source2: %{name}.sysconfig
24ab7c00
JR
20# http://ettercap.cvs.sourceforge.net/ettercap/ettercap_ng/share/etter.finger.os?rev=HEAD
21Source3: etter.finger.os
fb745d9b 22Patch0: %{name}-conf.patch
23Patch1: %{name}-config.patch
24Patch2: %{name}-am.patch
abadc7c1 25Patch3: %{name}-lua_wget.patch
a62aca02 26Patch4: %{name}-http_c.patch
27Patch5: %{name}-running-user.patch
28Patch6: ieee-oui.patch
29Patch7: %{name}-install.patch
3f97aafa 30URL: http://www.ntop.org/
1c15e1a3 31BuildRequires: GeoIP-devel
03329ce3 32BuildRequires: autoconf
fd17b5c4 33BuildRequires: automake >= 1.6
9e8c6481 34BuildRequires: gawk
23c07473 35BuildRequires: gd-devel >= 2.0.1
8aa70f00 36BuildRequires: gdbm-devel >= 1.8.3
26a5ca45
ER
37BuildRequires: gdome2-devel
38BuildRequires: glib2-devel
a62aca02 39BuildRequires: libdbi-devel
f839ee23 40BuildRequires: libevent-devel >= 1.4.0
3f97aafa 41BuildRequires: libpcap-devel
03329ce3 42BuildRequires: libpng-devel
ad718851 43BuildRequires: libtiff-devel
03329ce3 44BuildRequires: libtool
9e8c6481 45BuildRequires: libwrap-devel
abadc7c1 46BuildRequires: lua51-devel
75909d05 47BuildRequires: ncurses-devel >= 5.2
f9d989ae 48BuildRequires: net-snmp-devel
6ebc82ab 49BuildRequires: openssl-devel >= 0.9.7d
7318b900 50BuildRequires: perl-devel
75909d05 51BuildRequires: readline-devel >= 4.2
411f46d0 52BuildRequires: rpmbuild(macros) >= 1.268
fd17b5c4 53BuildRequires: rrdtool-devel >= 1.1.0
fe6022b1 54BuildRequires: zlib-devel
8005772a
ER
55Requires(post,postun): /sbin/ldconfig
56Requires(post,preun): /sbin/chkconfig
57Requires(postun): /usr/sbin/groupdel
58Requires(postun): /usr/sbin/userdel
31edeabf 59Requires(pre): /bin/id
1b68ade4 60Requires(pre): /usr/bin/getgid
31edeabf
JB
61Requires(pre): /usr/sbin/groupadd
62Requires(pre): /usr/sbin/useradd
a62aca02 63Requires: ieee-oui
dff01925 64Requires: rc-scripts >= 0.4.2.8
3f396d9b 65# maybe is optional, needs checking
abadc7c1
ER
66Suggests: GeoIP-db-City
67Suggests: GeoIP-db-IPASNum
68Suggests: ettercap
1b68ade4 69Provides: group(ntop)
70Provides: user(ntop)
3f97aafa
AM
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
1dced15e 73%define _localstatedir /var/lib
9e8c6481 74
3f97aafa
AM
75%description
76ntop is a tool that shows the network usage, similar to what the
77popular top Unix command does.
78
66d0b5be
JR
79%description -l pl.UTF-8
80ntop to narzędzie, które pokazuje użycie sieci w podobny sposób jak
5997acdb 81robi to popularna uniksowa komenda top.
3f97aafa
AM
82
83%prep
8005772a 84%setup -q
1db42d64 85%patch0 -p1
32b74bbf 86%patch1 -p1
fb745d9b 87%patch2 -p1
abadc7c1
ER
88%patch3 -p1
89%patch4 -p1
8db4b37a
ER
90%patch5 -p1
91%patch6 -p1
9d96f8b2
ER
92%patch7 -p1
93
24ab7c00
JR
94gzip -9c %{SOURCE3} >etter.finger.os.gz
95
1c15e1a3
ER
96# taken from autogen.sh
97cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
fb745d9b 98cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
3f97aafa
AM
99
100%build
9e8c6481 101%{__libtoolize}
8c73db90 102%{__aclocal}
aa754682 103%{__autoconf}
fb745d9b 104%{__autoheader}
5c8a70e7 105%{__automake}
9e8c6481 106# "verified.awk -u" calls require gawk
d4bb730c 107%configure \
9e8c6481
JB
108 AWK=gawk \
109 --disable-static \
fe6022b1 110 --with-gnu-ld \
9e8c6481 111 --with-ossl-root=%{_prefix} \
fb745d9b 112 --with-tcpwrap \
f9d989ae 113 --enable-snmp \
fb745d9b 114 %{?with_mysql:--enable-mysql}
8597cd3b 115
593fe373 116%{__make}
3f97aafa
AM
117
118%install
9eec0d7a 119rm -rf $RPM_BUILD_ROOT
1dced15e 120install -d $RPM_BUILD_ROOT{%{_localstatedir}/ntop/rrd,/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
3f97aafa 121
fe6022b1 122%{__make} install \
abadc7c1 123 GEOIP_FILES= \
9d96f8b2 124 OUI_FILES= \
abadc7c1 125 ETTER_PASSIVE= \
fe6022b1 126 DESTDIR=$RPM_BUILD_ROOT
8597cd3b 127
abadc7c1
ER
128install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
129cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
130cp -a packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
81772bff 131
f9d989ae
ER
132# these are identical files according to find-debuginfo
133for p in icmpPlugin lastSeenPlugin netflowPlugin cpacketPlugin rrdPlugin sflowPlugin; do
134 ln -snf ../../lib$p-%{version}.so $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/$p.so
135done
136
19d05b6c 137ln -s %{_datadir}/oui.txt $RPM_BUILD_ROOT%{_sysconfdir}/ntop/oui.txt
9d96f8b2 138
8005772a
ER
139# no -devel
140rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
c0b31d44 141
3f97aafa 142%clean
215b65a5 143rm -rf $RPM_BUILD_ROOT
3f97aafa 144
94207320 145%pre
e5996737 146%groupadd -g 120 ntop
1dced15e 147%useradd -u 120 -d %{_localstatedir}/ntop -s /bin/false -c "ntop User" -g ntop ntop
94207320 148
ffc5999b 149%post
94207320 150/sbin/ldconfig
151/sbin/chkconfig --add ntop
411f46d0 152%service ntop restart "ntop daemon"
94207320 153
154%preun
155if [ "$1" = "0" ]; then
411f46d0 156 %service ntop stop
b87b7487 157 /sbin/chkconfig --del ntop
94207320 158fi
159
ffc5999b 160%postun
94207320 161/sbin/ldconfig
162if [ "$1" = "0" ]; then
1b68ade4 163 %userremove ntop
164 %groupremove ntop
94207320 165fi
fe6022b1 166
3f97aafa
AM
167%files
168%defattr(644,root,root,755)
fd17b5c4 169%doc AUTHORS ChangeLog NEWS README THANKS docs/{1STRUN.txt,FAQ}
f9d989ae
ER
170%attr(750,root,ntop) %dir %{_sysconfdir}/ntop
171%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/ntop-cert.pem
9d96f8b2 172%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/oui.txt
f9d989ae
ER
173%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/specialMAC.txt.gz
174%attr(660,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop.conf
175%attr(754,root,root) /etc/rc.d/init.d/ntop
176%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntop
177%attr(755,root,root) %{_sbindir}/ntop
8005772a 178%attr(755,root,root) %{_libdir}/lib*.so
2a2238a1 179%attr(755,root,root) %{_datadir}/%{name}
041f4633 180%dir %{_libdir}/%{name}
215b65a5 181%attr(755,root,root) %{_libdir}/%{name}/plugins
f9d989ae
ER
182%{_mandir}/man8/ntop.8*
183
184%attr(770,root,ntop) %dir %{_localstatedir}/ntop
185%attr(770,root,ntop) %dir %{_localstatedir}/ntop/rrd
This page took 0.085487 seconds and 4 git commands to generate.