]> git.pld-linux.org Git - packages/ntop.git/blame - ntop.spec
- two more patches from fc
[packages/ntop.git] / ntop.spec
CommitLineData
1c15e1a3 1# TODO
abadc7c1 2# - see if it uses system files for ettercap and geoip files we did not package
8db4b37a
ER
3# - see if /etc/ntop/oui.txt.gz can be externalized (ethernet vendor id file),
4# hwdata uses same file for example. url: http://linux.die.net/man/1/get-oui
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
f839ee23 12Version: 3.3.10
abadc7c1 13Release: 3
3f97aafa 14License: GPL
9eec0d7a 15Group: Networking
1c15e1a3 16Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tar.gz
f839ee23 17# Source0-md5: 6e2ffa90d5f935c8f03d88a5dd19a866
81772bff 18Source1: %{name}.init
19Source2: %{name}.sysconfig
fb745d9b 20Patch0: %{name}-conf.patch
21Patch1: %{name}-config.patch
22Patch2: %{name}-am.patch
abadc7c1
ER
23Patch3: %{name}-lua_wget.patch
24Patch4: %{name}-geoip.patch
8db4b37a
ER
25Patch5: %{name}-http_c.patch
26Patch6: %{name}-running-user.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
6ebc82ab 44BuildRequires: openssl-devel >= 0.9.7d
75909d05 45BuildRequires: readline-devel >= 4.2
411f46d0 46BuildRequires: rpmbuild(macros) >= 1.268
fd17b5c4 47BuildRequires: rrdtool-devel >= 1.1.0
fe6022b1 48BuildRequires: zlib-devel
8005772a
ER
49Requires(post,postun): /sbin/ldconfig
50Requires(post,preun): /sbin/chkconfig
51Requires(postun): /usr/sbin/groupdel
52Requires(postun): /usr/sbin/userdel
31edeabf 53Requires(pre): /bin/id
1b68ade4 54Requires(pre): /usr/bin/getgid
31edeabf
JB
55Requires(pre): /usr/sbin/groupadd
56Requires(pre): /usr/sbin/useradd
8005772a 57Requires: rc-scripts
abadc7c1
ER
58# maybe is optional, needs checking
59Suggests: GeoIP-db-City
60Suggests: GeoIP-db-IPASNum
61Suggests: ettercap
1b68ade4 62Provides: group(ntop)
63Provides: user(ntop)
3f97aafa
AM
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
1dced15e 66%define _localstatedir /var/lib
9e8c6481 67
3f97aafa
AM
68%description
69ntop is a tool that shows the network usage, similar to what the
70popular top Unix command does.
71
66d0b5be
JR
72%description -l pl.UTF-8
73ntop to narzędzie, które pokazuje użycie sieci w podobny sposób jak
5997acdb 74robi to popularna uniksowa komenda top.
3f97aafa
AM
75
76%prep
8005772a 77%setup -q
1db42d64 78%patch0 -p1
32b74bbf 79%patch1 -p1
fb745d9b 80%patch2 -p1
abadc7c1
ER
81%patch3 -p1
82%patch4 -p1
8db4b37a
ER
83%patch5 -p1
84%patch6 -p1
9e8c6481 85
1c15e1a3
ER
86# taken from autogen.sh
87cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
fb745d9b 88cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
3f97aafa
AM
89
90%build
9e8c6481 91%{__libtoolize}
8c73db90 92%{__aclocal}
aa754682 93%{__autoconf}
fb745d9b 94%{__autoheader}
5c8a70e7 95%{__automake}
9e8c6481 96# "verified.awk -u" calls require gawk
d4bb730c 97%configure \
9e8c6481
JB
98 AWK=gawk \
99 --disable-static \
fe6022b1 100 --with-gnu-ld \
9e8c6481 101 --with-ossl-root=%{_prefix} \
fb745d9b 102 --with-tcpwrap \
103 %{?with_mysql:--enable-mysql}
8597cd3b 104
593fe373 105%{__make}
3f97aafa
AM
106
107%install
9eec0d7a 108rm -rf $RPM_BUILD_ROOT
1dced15e 109install -d $RPM_BUILD_ROOT{%{_localstatedir}/ntop/rrd,/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
3f97aafa 110
fe6022b1 111%{__make} install \
abadc7c1
ER
112 GEOIP_FILES= \
113 ETTER_PASSIVE= \
fe6022b1 114 DESTDIR=$RPM_BUILD_ROOT
8597cd3b 115
abadc7c1
ER
116install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
117cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
118cp -a packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
81772bff 119
8005772a
ER
120# no -devel
121rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
c0b31d44 122
3f97aafa 123%clean
215b65a5 124rm -rf $RPM_BUILD_ROOT
3f97aafa 125
94207320 126%pre
e5996737 127%groupadd -g 120 ntop
1dced15e 128%useradd -u 120 -d %{_localstatedir}/ntop -s /bin/false -c "ntop User" -g ntop ntop
94207320 129
ffc5999b 130%post
94207320 131/sbin/ldconfig
132/sbin/chkconfig --add ntop
411f46d0 133%service ntop restart "ntop daemon"
94207320 134
135%preun
136if [ "$1" = "0" ]; then
411f46d0 137 %service ntop stop
b87b7487 138 /sbin/chkconfig --del ntop
94207320 139fi
140
ffc5999b 141%postun
94207320 142/sbin/ldconfig
143if [ "$1" = "0" ]; then
1b68ade4 144 %userremove ntop
145 %groupremove ntop
94207320 146fi
fe6022b1 147
3f97aafa
AM
148%files
149%defattr(644,root,root,755)
fd17b5c4 150%doc AUTHORS ChangeLog NEWS README THANKS docs/{1STRUN.txt,FAQ}
1dced15e
ER
151%attr(770,root,ntop) %dir %{_localstatedir}/ntop
152%attr(770,root,ntop) %dir %{_localstatedir}/ntop/rrd
8005772a
ER
153%attr(755,root,root) %{_sbindir}/*
154%attr(755,root,root) %{_libdir}/lib*.so
2a2238a1 155%attr(755,root,root) %{_datadir}/%{name}
041f4633 156%dir %{_libdir}/%{name}
215b65a5 157%attr(755,root,root) %{_libdir}/%{name}/plugins
3f97aafa 158%{_mandir}/man*/*
31edeabf 159%attr(754,root,root) /etc/rc.d/init.d/ntop
8005772a
ER
160%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntop
161%attr(750,root,ntop) %dir %{_sysconfdir}/ntop
162%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/*
fd17b5c4 163%attr(660,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop.conf
This page took 0.197683 seconds and 4 git commands to generate.