1 |
Summary: Arpwatch is a tool that monitors ethernet activity |
2 |
%define name smeserver-arpwatch |
3 |
Name: %{name} |
4 |
%define version 0.1 |
5 |
%define release 1 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: Monitoring |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
|
12 |
Patch0: smeserver-arpwatch-0.1-not_supervised.patch |
13 |
|
14 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
15 |
BuildArchitectures: noarch |
16 |
Requires: e-smith-base |
17 |
Requires: arpwatch |
18 |
|
19 |
%description |
20 |
Arpwatch is a tool that monitors ethernet activity and keeps |
21 |
a database of ethernet/ip address pairings. |
22 |
It also reports certain changes via email. |
23 |
Arpwatch uses libpcap, a system-independent interface for |
24 |
user-level packet capture. |
25 |
|
26 |
%changelog |
27 |
* Tue Jan 27 2009 Daniel B. <daniel@firewall-services.com> [0.1-1] |
28 |
- Service not supervised (as the only option to disable forking is -d |
29 |
which also disable email alerts) |
30 |
|
31 |
* Tue Jan 27 2009 Daniel B. <daniel@firewall-services.com> [0.1-0] |
32 |
- Initial release |
33 |
|
34 |
%prep |
35 |
|
36 |
%setup -q -n %{name}-%{version} |
37 |
%patch0 -p1 |
38 |
|
39 |
%build |
40 |
perl createlinks |
41 |
|
42 |
%install |
43 |
/bin/rm -rf $RPM_BUILD_ROOT |
44 |
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
45 |
/bin/rm -f %{name}-%{version}-filelist |
46 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
47 |
--dir /var/lib/arpwatch 'attr(0750,pcap,pcap)' \ |
48 |
--file /var/lib/arpwatch/arp.dat 'attr(0750,pcap,pcap) %config(noreplace)' \ |
49 |
> %{name}-%{version}-filelist |
50 |
|
51 |
%files -f %{name}-%{version}-filelist |
52 |
%defattr(-,root,root) |
53 |
|
54 |
%clean |
55 |
rm -rf $RPM_BUILD_ROOT |
56 |
|
57 |
|
58 |
%post |
59 |
|
60 |
%preun |
61 |
if [ $1 -eq 0 ] ; then |
62 |
/sbin/e-smith/db configuration setprop arpwatch status disabled |
63 |
/etc/init.d/arpwatch stop |
64 |
fi |
65 |
|
66 |
true |
67 |
|