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