~ubuntu-branches/ubuntu/trusty/ntop/trusty

« back to all changes in this revision

Viewing changes to packages/Fedora/ntop.spec

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2008-06-15 14:38:28 UTC
  • mfrom: (2.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080615143828-oalh84nda2hje4do
Tags: 3:3.3-11
Correction of Polish translation encoding, closes: #479490. Thanks
to Christian Perrier <bubulle@debian.org> for the help.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%bcond_without  fedora
 
2
 
 
3
# Once this package has passed review, a formal uid should be assigned.
 
4
# http://fedoraproject.org/wiki/PackageUserRegistry
 
5
%define         registry_uid   %nil
 
6
%define         registry_name  ntop
 
7
 
 
8
%define         cvsversion     20070608cvs
 
9
 
 
10
Name:           ntop
 
11
Version:        3.3
 
12
Release:        0.13.%{cvsversion}%{?dist}
 
13
Summary:        A network traffic probe similar to the UNIX top command
 
14
 
 
15
Group:          Applications/Internet
 
16
License:        GPL
 
17
URL:            http://www.ntop.org
 
18
#Source0:        http://downloads.sourceforge.net/ntop/ntop-3.3.tgz
 
19
# This source comes from the ntop cvs.  It is a pre-release of the 3.3 source.
 
20
# It was taken on 2007-Jun-08.  You can recreate this tarball with the
 
21
# following commands:
 
22
#   CVSROOT=:pserver:anonymous@cvs.ntop.org:/export/home/ntop
 
23
#   cvs login               (enter 'ntop' as password)
 
24
#   cvs checkout -D "2007-06-08 00:00:00 UTC" ntop
 
25
#   tar -cvzf ntop-20070608cvs.tar.gz ntop
 
26
Source0:        ntop-%{cvsversion}.tar.gz
 
27
Source1:        ntop.init
 
28
 
 
29
Patch0:         ntop-conf.patch
 
30
Patch1:         ntop-am.patch
 
31
Patch2:         ntop-running-user.patch
 
32
Patch3:         ntop-dbfile-default-dir.patch
 
33
Patch4:         ntop-remove-rc.patch
 
34
Patch10:        ntop-shrext.patch
 
35
 
 
36
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
37
 
 
38
BuildRequires:  autoconf, automake, pkgconfig, libtool, groff, libpcap-devel
 
39
BuildRequires:  gdbm-devel, gd-devel, rrdtool-devel, openssl-devel
 
40
BuildRequires:  net-snmp-devel, lm_sensors-devel, fedora-usermgmt-devel
 
41
BuildRequires:  pcre-devel, mysql-devel
 
42
 
 
43
%if 0%{?fedora} >= 7
 
44
BuildRequires:  tcp_wrappers-devel
 
45
%else
 
46
BuildRequires:  tcp_wrappers
 
47
%endif
 
48
 
 
49
Requires:       initscripts
 
50
Requires(post): /sbin/chkconfig       
 
51
Requires(preun):/sbin/chkconfig       
 
52
%{?FE_USERADD_REQ}
 
53
 
 
54
 
 
55
%description
 
56
ntop is a network traffic probe that shows the network usage, similar to what
 
57
the popular top Unix command does. ntop is based on libpcap and it has been
 
58
written in a portable way in order to virtually run on every Unix platform and
 
59
on Win32 as well.
 
60
 
 
61
ntop users can use a a web browser (e.g. netscape) to navigate through ntop
 
62
(that acts as a web server) traffic information and get a dump of the network
 
63
status. In the latter case, ntop can be seen as a simple RMON-like agent with
 
64
an embedded web interface. The use of:
 
65
 
 
66
    * a web interface
 
67
    * limited configuration and administration via the web interface
 
68
    * reduced CPU and memory usage (they vary according to network size and
 
69
      traffic) 
 
70
 
 
71
make ntop easy to use and suitable for monitoring various kind of networks.
 
72
 
 
73
ntop should be manually started the first time so that the administrator
 
74
password can be selected.
 
75
 
 
76
 
 
77
%prep
 
78
%setup -q -n ntop
 
79
 
 
80
# While we are using CVS, kill all the CVS files and directories
 
81
find . -type d -name CVS | xargs rm -rf
 
82
 
 
83
# executable bits are set on some config files and docs that go into
 
84
# %%{_sysconfdir}/ntop and %%{_datadir}, and some debug source files.  Remove
 
85
# the execute bits - in the build directory
 
86
find . \( -name \*\.gz -o -name \*\.c -o -name \*\.h -o -name \*\.pdf \
 
87
     -o -name \*\.dtd -o -name \*\.html -o -name \*\.js \) -print     \
 
88
     | xargs chmod a-x
 
89
 
 
90
%patch0 -p1 -b .conf
 
91
%patch1 -p1 -b .am
 
92
%patch2 -p1 -b .user
 
93
%patch3 -p1 -b .dbfile-default-dir
 
94
%patch4 -p1 -b .remove-rc
 
95
%patch10 -R -p1 -b .shrext
 
96
 
 
97
 
 
98
%build
 
99
autoreconf -i -f
 
100
 
 
101
#export CFLAGS="%{optflags} -DDEBUG"
 
102
%{configure} --enable-optimize                         \
 
103
             --with-tcpwrap                            \
 
104
             --enable-largerrdpop                      \
 
105
             --enable-sslv3                            \
 
106
             --enable-i18n                             \
 
107
             --enable-snmp                             \
 
108
             --enable-mysql                            \
 
109
             --disable-static
 
110
 
 
111
%{__make} %{?_smp_mflags} faq.html ntop.txt ntop.html all
 
112
 
 
113
 
 
114
%install
 
115
%{__rm} -rf $RPM_BUILD_ROOT
 
116
%{__make} install install-data-local install-data-as DESTDIR=$RPM_BUILD_ROOT
 
117
 
 
118
# Now add init, etc
 
119
%{__install} -d $RPM_BUILD_ROOT/%{_initrddir}
 
120
%{__install} -p -m 0755 %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}/ntop
 
121
%{__install} -p -m 0644 packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT/%{_sysconfdir}/ntop.conf
 
122
 
 
123
# remove libtool archives and -devel type stuff (but leave dlopened modules)
 
124
#find $RPM_BUILD_ROOT -name \*\.la -print -o -name \*\.a -print | xargs rm -f
 
125
find $RPM_BUILD_ROOT -name \*\.la -print | xargs rm -f
 
126
# these are not dlopened modules, but -devel cruft
 
127
rm -f $RPM_BUILD_ROOT/%{_libdir}/lib{myrrd,ntop,ntopreport,*Plugin*}.so
 
128
 
 
129
# strip off version number from plugin .so files
 
130
for file in $RPM_BUILD_ROOT/%{_libdir}/%{name}/plugins/*so; do
 
131
  if test -L $file; then
 
132
    base=`basename $file .so`
 
133
    mv $RPM_BUILD_ROOT/%{_libdir}/%{name}/plugins/$base-%{version}.so $file
 
134
  fi
 
135
done
 
136
 
 
137
# Create files to be %ghost'ed - %ghost'ed files must exist in the buildroot
 
138
%{__install} -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/{flows,graphics}
 
139
%{__install} -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/interfaces
 
140
touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db
 
141
 
 
142
%clean
 
143
%{__rm} -rf $RPM_BUILD_ROOT
 
144
 
 
145
%pre
 
146
if [ $1 = 1 ]; then
 
147
  %{__fe_groupadd} %{registry_uid} -r ntop &> /dev/null || :
 
148
  %{__fe_useradd}  %{registry_uid} -r -s /sbin/nologin  \
 
149
                   -d %{_localstatedir}/lib/ntop -M -c 'ntop' \
 
150
                   -g %{registry_name} %{registry_name} &> /dev/null || :
 
151
fi
 
152
 
 
153
%post
 
154
if [ $1 = 1 ]; then
 
155
  /sbin/chkconfig --add %{name} &> /dev/null || :
 
156
fi
 
157
 
 
158
%preun
 
159
if [ $1 = 0 ]; then
 
160
  /sbin/service %{name} stop    &> /dev/null || :
 
161
  /sbin/chkconfig --del %{name} &> /dev/null || :
 
162
fi
 
163
 
 
164
%postun
 
165
if [ "$1" -ge "1" ]; then
 
166
  /sbin/service %{name} condrestart &> /dev/null || :
 
167
else
 
168
  %{__fe_userdel}  %{registry_name} &> /dev/null || :
 
169
  %{__fe_groupdel} %{registry_name} &> /dev/null || :
 
170
fi
 
171
 
 
172
%files
 
173
%defattr(-,root,root,-)
 
174
%doc AUTHORS ChangeLog COPYING MANIFESTO
 
175
%doc docs/BUG_REPORT docs/database/README docs/database/README.mySQL docs/FAQ
 
176
%doc docs/FAQarchive docs/FAQ docs/HACKING docs/KNOWN_BUGS docs/TODO
 
177
%doc docs/1STRUN.txt NEWS README SUPPORT_NTOP.txt THANKS
 
178
%config(noreplace) %{_sysconfdir}/ntop.conf
 
179
%config(noreplace) %{_sysconfdir}/ntop
 
180
%{_initrddir}/ntop
 
181
%{_sbindir}/*
 
182
%{_libdir}/lib*%{version}*.so
 
183
%{_libdir}/ntop
 
184
%{_mandir}/man8/*
 
185
%{_datadir}/ntop
 
186
%dir %{_localstatedir}/lib/ntop
 
187
%defattr(0640,root,root,-)
 
188
%ghost %{_localstatedir}/lib/ntop/addressQueue.db
 
189
%ghost %{_localstatedir}/lib/ntop/dnsCache.db
 
190
%ghost %{_localstatedir}/lib/ntop/fingerprint.db
 
191
%ghost %{_localstatedir}/lib/ntop/LsWatch.db
 
192
%ghost %{_localstatedir}/lib/ntop/macPrefix.db
 
193
%ghost %{_localstatedir}/lib/ntop/ntop_pw.db
 
194
%ghost %{_localstatedir}/lib/ntop/prefsCache.db
 
195
# This will catch all the directories in rrd.  If %ghost'ed files are added
 
196
# under rrd, this will have to be changed to %dir and more directives for
 
197
# directories under rrd will have to be added.
 
198
%defattr(0770,root,ntop,-)
 
199
%{_localstatedir}/lib/ntop/rrd
 
200
 
 
201
%changelog
 
202
* Wed Jun 08 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.13.20070608cvs
 
203
- update to 20070608cvs
 
204
- update patch to remove rc version
 
205
- remove remove-gd-version-guess.patch (not needed anymore)
 
206
- remove xmldump plugin dependencies since it has been disabled (broken) in
 
207
  default ntop installation
 
208
 
 
209
* Fri Apr 06 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.12.20070407cvs
 
210
- update to 20070407cvs
 
211
- compile with -DDEBUG for now to check for problems
 
212
- rework ntop-am.patch with recent changes
 
213
- patch to remove gdVersionGuessValue from plugin
 
214
- repatch with shrext patch
 
215
 
 
216
* Mon Mar 19 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.11.20070319cvs
 
217
- update to 20070319cvs
 
218
- remove patches that have been added upstream
 
219
 
 
220
* Fri Mar 16 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.10.20070314cvs
 
221
- fix rpmlint warning for initfile
 
222
- include 2 of Patrice's patches to cleanup builds
 
223
- remove repotag
 
224
 
 
225
* Fri Mar 16 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.9.20070314cvs
 
226
- update to 20070314cvs
 
227
- add additional mysql patch from Patrice
 
228
- remove all of unused logrotate pieces
 
229
- use /sbin/service to start/stop services
 
230
- update scriptlets to be easier to read
 
231
- Better description to initfile summary
 
232
- add LSB bits to initfile
 
233
 
 
234
* Mon Mar 07 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.8.20070307cvs
 
235
- update to 20070307cvs
 
236
- move database files to %%{_localstatedir}/lib/ntop
 
237
- fix javascript files not being installed
 
238
- remove x bit from additional javascript files
 
239
 
 
240
* Sat Mar 03 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.6.20060207cvs
 
241
- add --enable-mysql to compile mysql support
 
242
 
 
243
* Sat Mar 03 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.5.20060207cvs
 
244
- prefix patches with ntop-
 
245
- explanation on how to retrieve cvs source
 
246
- fix removal of %%{_libdir}/.so plugin files no matter the version
 
247
- reduce dependency on mysql-server to just mysql
 
248
 
 
249
* Fri Mar 02 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.4.20060227cvs
 
250
- add pcre-devel to BR so payloads can be matched
 
251
- remove unused Source4 line
 
252
- enabled mysql storage of net flow data
 
253
 
 
254
* Tue Feb 27 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.3.20060227cvs
 
255
- update to ntop cvs 20060227
 
256
- kill all the CVS files/directories
 
257
- remove glib2-devel BR because gdome2-devel requires it
 
258
- tcp_wrappers vs. tcp_wrappers-devel no dependent on os release
 
259
- add initscripts to requires since init file uses daemon function
 
260
- patch .so files to just version 3.3 not 3.3rc0; otherwise rpmlint complains
 
261
- fix typo in init file
 
262
 
 
263
* Wed Feb 18 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.2.20060218cvs
 
264
- update to ntop cvs 20060208
 
265
 
 
266
* Wed Feb 07 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.1.20060207cvs
 
267
- update to ntop cvs 20060207
 
268
- remove gdbm, pidfile, and FEDORAextra patches
 
269
- ntopdump.dtd has fixed eol markers now
 
270
- update nolibs patch so there is no complaint about xmldump libraries/headers
 
271
 
 
272
* Tue Feb 06 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.2-8.1.20060206cvs
 
273
- update to cvs 20060206
 
274
- update ntop-am.patch for cvs version
 
275
- get rid of plugins patch and just remove cruft in spec file
 
276
 
 
277
* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-7
 
278
- add missing net-snmp-devel, and lm_sensors-devel BR
 
279
 
 
280
* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-6
 
281
- configure --disable-static
 
282
- configure --enable-snmp
 
283
- patch to fix permissions of created gdbm databases
 
284
- no more ntop-passwd
 
285
- fix OK printing in init file, redirect stdout of ntop command to null
 
286
- fix permissions on LsWatch.db database creation
 
287
- only listen on 127.0.0.1:3000 by default
 
288
 
 
289
* Mon Dec 11 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-5
 
290
- use ntop.conf.sample with some modifications
 
291
- change default syslog facilty to daemon in init file
 
292
- add repo tag for those who want to use it
 
293
- install as-data by default, at least for now
 
294
- fix package detection of gdome library
 
295
- remove extraneous ldconfig call
 
296
 
 
297
* Mon Dec 11 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-4
 
298
- fix detection of glib-2.0 and gdome2
 
299
- remove Requires: entries to let rpm figure them out
 
300
- remove BR libxml2, zlib-devel as they are pulled by other packages
 
301
- added scriplet requires for /sbin/chkconfig
 
302
- add logrotate to requires
 
303
- add BR dependency on pkgconfig since patch to fix missing files depends on it
 
304
 
 
305
* Mon Dec 11 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-3
 
306
- fix: do not package debug files in arch package
 
307
- fix: remove x bit from /usr/src debug files
 
308
- fix: direct source download link
 
309
- fix: don't package devel libraries in /usr/lib
 
310
- integrate previous package ntop.sysv to ntop.init
 
311
- remove sysconfig file
 
312
- clean up usage of fedora-usermgt
 
313
- remove ldconfig calls
 
314
- create a ntop-passwd wrapper to set the passwd
 
315
- fix: directory permission in directory, init, and passwd wrapper
 
316
 
 
317
* Sat Dec 09 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-2
 
318
- revert to 3.2 sources
 
319
- integrate changes from previous package
 
320
 
 
321
* Fri Dec 08 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-1.20061208cvs
 
322
- initial package