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