]> git.pld-linux.org Git - packages/argus.git/blob - argus.spec
- homedir for argus is not needed, so as glen suggested: /usr/share/empty
[packages/argus.git] / argus.spec
1 # TODO
2 # - logrotate (or argusrotate)
3 # - configure without options not working
4 #
5 # Conditional build:
6 %bcond_without  tcp_wrappers    # build with tcp_wrappers support
7 %bcond_without  sasl            # build with sasl support
8 #
9 %define         _ver_major      3.0
10 %define         _ver_minor      0
11 %define         _rc             rc.40
12 %define         _rel    0.2
13 Summary:        Real time network flow monitor
14 Summary(pl.UTF-8):      Monitor obciążenia sieci czasu rzeczywistego
15 Name:           argus
16 Version:        %{_ver_major}.%{_ver_minor}
17 Release:        0.%{_rc}.%{_rel}
18 License:        GPL v2
19 Group:          Applications/Networking
20 Source0:        ftp://qosient.com/dev/argus-%{_ver_major}/%{name}-%{version}.%{_rc}.tar.gz
21 # Source0-md5:  49047be6450c6255cceb3fb9bfe3caed
22 Source1:        %{name}.conf
23 Source2:        %{name}.init
24 Source3:        %{name}.sysconfig
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
39 %description -l pl.UTF-8
40
41 %prep
42 %setup -q -n %{name}-%{version}.%{_rc}
43
44 %build
45 %configure \
46         --with%{!?with_tcp_wrappers:out}-libwrap \
47         --with%{!?with_sasl:out}-sasl
48 %{__make}
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
54 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
55 install -d $RPM_BUILD_ROOT%{_var}/log/%{name}
56
57 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
58 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
59 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
60
61 touch $RPM_BUILD_ROOT%{_var}/log/%{name}/%{name}.log
62
63 %{__make} install \
64         DESTDIR=$RPM_BUILD_ROOT
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %pre
70 %groupadd -g 214 -r argus
71 %useradd -M -o -r -u 214 -d /usr/share/empty -s /bin/sh -g argus -c "argus daemon" argus
72
73 %post
74 /sbin/chkconfig --add %{name}
75 %service %{name} restart
76
77 %preun
78 if [ "$1" = "0" ]; then
79         %service -q %{name} stop
80         /sbin/chkconfig --del %{name}
81 fi
82
83 %files
84 %defattr(644,root,root,755)
85 %doc CREDITS ChangeLog README doc/{CHANGES,FAQ,HOW-TO}
86 %attr(755,root,root) %{_bindir}/argusbug
87 %attr(755,root,root) %{_sbindir}/argus
88 %attr(754,root,root) /etc/rc.d/init.d/%{name}
89 %dir %{_sysconfdir}/%{name}
90 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
91 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
92 %dir %{_var}/log/%{name}
93 %attr(640,argus,root,) %ghost %{_var}/log/%{name}/%{name}.log
94 %{_mandir}/man5/argus.conf.5*
95 %{_mandir}/man8/argus.8*
This page took 0.084369 seconds and 3 git commands to generate.