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