]>
Commit | Line | Data |
---|---|---|
f48b1c7c | 1 | # TODO |
2 | # - logrotate (or argusrotate) | |
3 | # - configure without options not working | |
0f914c1e | 4 | # - argus user homedir doesn't exist (is not packaged), or keep it /usr/share/empty |
f48b1c7c | 5 | # |
6 | # Conditional build: | |
7 | %bcond_without tcp_wrappers # build with tcp_wrappers support | |
8 | %bcond_without sasl # build with sasl support | |
9 | # | |
f48b1c7c | 10 | %define _ver_major 3.0 |
17341c10 ER |
11 | %define _ver_minor 0 |
12 | %define _rc rc.40 | |
13 | %define _rel 0.2 | |
e1878cbc ER |
14 | Summary: Real time network flow monitor |
15 | Summary(pl.UTF-8): Monitor obciążenia sieci czasu rzeczywistego | |
16 | Name: argus | |
17341c10 ER |
17 | Version: %{_ver_major}.%{_ver_minor} |
18 | Release: 0.%{_rc}.%{_rel} | |
f48b1c7c | 19 | License: GPL v2 |
20 | Group: Applications/Networking | |
17341c10 | 21 | Source0: ftp://qosient.com/dev/argus-%{_ver_major}/%{name}-%{version}.%{_rc}.tar.gz |
f48b1c7c | 22 | # Source0-md5: 49047be6450c6255cceb3fb9bfe3caed |
23 | Source1: %{name}.conf | |
24 | Source2: %{name}.init | |
25 | Source3: %{name}.sysconfig | |
26 | URL: http://www.qosient.com/argus/ | |
f48b1c7c | 27 | BuildRequires: bison |
f48b1c7c | 28 | %{?with_tcp_wrappers:BuildRequires: cyrus-sasl-devel} |
e1878cbc ER |
29 | BuildRequires: libpcap-devel |
30 | %{?with_tcp_wrappers:BuildRequires: libwrap-devel} | |
31 | BuildRequires: rpmbuild(macros) >= 1.268 | |
32 | Requires(post,preun): /sbin/chkconfig | |
0a88ec58 | 33 | Requires: rc-scripts |
f48b1c7c | 34 | Provides: group(argus) |
35 | Provides: user(argus) | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | %description | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | ||
42 | %prep | |
17341c10 | 43 | %setup -q -n %{name}-%{version}.%{_rc} |
f48b1c7c | 44 | |
45 | %build | |
46 | %configure \ | |
47 | --with%{!?with_tcp_wrappers:out}-libwrap \ | |
48 | --with%{!?with_sasl:out}-sasl | |
49 | %{__make} | |
50 | ||
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} | |
55 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} | |
56 | install -d $RPM_BUILD_ROOT%{_var}/log/%{name} | |
57 | ||
58 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf | |
59 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
60 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
61 | ||
62 | touch $RPM_BUILD_ROOT%{_var}/log/%{name}/%{name}.log | |
63 | ||
64 | %{__make} install \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %pre | |
71 | %groupadd -g 214 -r argus | |
72 | %useradd -M -o -r -u 214 -d /home/services/argus -s /bin/sh -g argus -c "argus daemon" argus | |
73 | ||
74 | %post | |
75 | /sbin/chkconfig --add %{name} | |
76 | %service %{name} restart | |
77 | ||
78 | %preun | |
79 | if [ "$1" = "0" ]; then | |
80 | %service -q %{name} stop | |
81 | /sbin/chkconfig --del %{name} | |
82 | fi | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc CREDITS ChangeLog README doc/{CHANGES,FAQ,HOW-TO} | |
87 | %attr(755,root,root) %{_bindir}/argusbug | |
88 | %attr(755,root,root) %{_sbindir}/argus | |
89 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
e1878cbc ER |
90 | %dir %{_sysconfdir}/%{name} |
91 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
f48b1c7c | 92 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
93 | %dir %{_var}/log/%{name} | |
94 | %attr(640,argus,root,) %ghost %{_var}/log/%{name}/%{name}.log | |
e1878cbc ER |
95 | %{_mandir}/man5/argus.conf.5* |
96 | %{_mandir}/man8/argus.8* |