]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - configure without options not working | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without tcp_wrappers # build with tcp_wrappers support | |
6 | %bcond_without sasl # build with sasl support | |
7 | # | |
8 | %define _ver_major 3.0 | |
9 | %define _ver_minor 0 | |
10 | Summary: Real time network flow monitor | |
11 | Summary(pl.UTF-8): Monitor obciążenia sieci czasu rzeczywistego | |
12 | Name: argus | |
13 | Version: %{_ver_major}.%{_ver_minor} | |
14 | Release: 0.1 | |
15 | License: GPL v2 | |
16 | Group: Applications/Networking | |
17 | Source0: ftp://qosient.com/dev/argus-%{_ver_major}/%{name}-%{version}.tar.gz | |
18 | # Source0-md5: c5f143fce0fa41239612fcc3619e6886 | |
19 | Source1: %{name}.conf | |
20 | Source2: %{name}.init | |
21 | Source3: %{name}.sysconfig | |
22 | Source4: %{name}.logrotate | |
23 | URL: http://www.qosient.com/argus/ | |
24 | BuildRequires: autoconf | |
25 | BuildRequires: automake | |
26 | BuildRequires: bison | |
27 | %{?with_sasl:BuildRequires: cyrus-sasl-devel} | |
28 | BuildRequires: flex | |
29 | BuildRequires: libpcap-devel | |
30 | %{?with_tcp_wrappers:BuildRequires: libwrap-devel} | |
31 | BuildRequires: rpmbuild(macros) >= 1.268 | |
32 | Requires(post,preun): /sbin/chkconfig | |
33 | Requires: rc-scripts | |
34 | Provides: group(argus) | |
35 | Provides: user(argus) | |
36 | Conflicts: logrotate < 3.8.0 | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
40 | Argus is a Real Time Flow Monitor designed to track and report on the | |
41 | status and performance of all network transactions seen in a data | |
42 | network traffic stream. It is similiar to Cisco NetFlow, however more | |
43 | powerful and with different data format. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Argus jest monitorem sieci czasu rzeczywistego zaprojektowanym do | |
47 | śledzenia i raportowania stanu sieci oraz wszelkiego typu transakcji | |
48 | sieciowych widzianych w strumieniu danych. Jest bardzo podobny do | |
49 | NetFlow z Cisco, jednak bardziej rozbudowany i posiada inny format | |
50 | danych. | |
51 | ||
52 | %prep | |
53 | %setup -q | |
54 | ||
55 | %build | |
56 | rm -r config/* | |
57 | cp -f %{_datadir}/automake/{config.sub,install-sh} config | |
58 | : > config/mkinstalldirs | |
59 | chmod +x config/mkinstalldirs | |
60 | %{__aclocal} | |
61 | %{__autoconf} | |
62 | %configure \ | |
63 | --with%{!?with_tcp_wrappers:out}-libwrap \ | |
64 | --with%{!?with_sasl:out}-sasl | |
65 | %{__make} | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} | |
71 | install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} | |
72 | install -d $RPM_BUILD_ROOT%{_var}/log/%{name} | |
73 | ||
74 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf | |
75 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
76 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
77 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
78 | ||
79 | touch $RPM_BUILD_ROOT%{_var}/log/%{name}/%{name}.log | |
80 | ||
81 | %{__make} install \ | |
82 | DESTDIR=$RPM_BUILD_ROOT | |
83 | ||
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %pre | |
88 | %groupadd -g 214 argus | |
89 | %useradd -u 214 -d /usr/share/empty -s /bin/sh -g argus -c "argus daemon" argus | |
90 | ||
91 | %post | |
92 | /sbin/chkconfig --add %{name} | |
93 | %service %{name} restart | |
94 | ||
95 | %preun | |
96 | if [ "$1" = "0" ]; then | |
97 | %service -q %{name} stop | |
98 | /sbin/chkconfig --del %{name} | |
99 | fi | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc CREDITS ChangeLog README doc/{CHANGES,FAQ,HOW-TO} | |
104 | %attr(755,root,root) %{_bindir}/argusbug | |
105 | %attr(755,root,root) %{_sbindir}/argus | |
106 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
107 | %dir %{_sysconfdir}/%{name} | |
108 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
109 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
110 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
111 | %attr(770,root,argus) %dir %{_var}/log/%{name} | |
112 | %attr(660,root,argus) %ghost %{_var}/log/%{name}/%{name}.log | |
113 | %{_mandir}/man5/argus.conf.5* | |
114 | %{_mandir}/man8/argus.8* |