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