1 |
Summary: Network monitoring tools for tracking IP addresses on the network |
2 |
Name: arpwatch |
3 |
Version: 2.1a15 |
4 |
Release: %mkrel 9 |
5 |
Epoch: 2 |
6 |
License: BSD |
7 |
Group: Monitoring |
8 |
URL: ftp://ftp.ee.lbl.gov |
9 |
Source0: ftp://ftp.ee.lbl.gov/arpwatch-%{version}.tar.gz |
10 |
Source1: arpwatch.init |
11 |
Source2: arpwatch.sysconfig |
12 |
Patch0: arpwatch-Makefile-fixes.patch |
13 |
Patch1: arpwatch-2.1a11-noip.diff |
14 |
Patch2: arpwatch-2.1a13-drop_root.diff |
15 |
Patch3: arpwatch-drop-man.patch |
16 |
Patch4: arpwatch-2.1a13-mail_user.diff |
17 |
Patch5: arpwatch-2.1a15-LDFLAGS.diff |
18 |
BuildRequires: libpcap-devel |
19 |
Requires(post): rpm-helper |
20 |
Requires(preun): rpm-helper |
21 |
Requires(pre): rpm-helper |
22 |
Requires(postun): rpm-helper |
23 |
Requires: sendmail-command |
24 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
25 |
|
26 |
%description |
27 |
The arpwatch package contains arpwatch and arpsnmp. Arpwatch and arpsnmp |
28 |
are both network monitoring tools. Both utilities monitor Ethernet or |
29 |
FDDI network traffic and build databases of Ethernet/IP address pairs, |
30 |
and can report certain changes via email. |
31 |
|
32 |
Install the arpwatch package if you need networking monitoring devices |
33 |
which will automatically keep traffic of the IP addresses on your |
34 |
network. |
35 |
|
36 |
%prep |
37 |
|
38 |
%setup -q |
39 |
%patch0 -p1 |
40 |
%patch1 -p1 |
41 |
%patch2 -p0 -b .droproot |
42 |
%patch3 -p0 -b .droprootman |
43 |
%patch4 -p1 -b .mailuser |
44 |
%patch5 -p0 |
45 |
|
46 |
cp %{SOURCE1} arpwatch.init |
47 |
cp %{SOURCE2} arpwatch.sysconfig |
48 |
|
49 |
%build |
50 |
libtoolize --copy --force |
51 |
|
52 |
%serverbuild |
53 |
%configure2_5x |
54 |
%make \ |
55 |
ARPDIR=%{_localstatedir}/lib/arpwatch \ |
56 |
SENDMAIL="%{_sbindir}/sendmail" \ |
57 |
LDFLAGS="%ldflags" |
58 |
|
59 |
%install |
60 |
rm -rf %{buildroot} |
61 |
|
62 |
install -d %{buildroot}%{_initrddir} |
63 |
install -d %{buildroot}%{_sysconfdir}/sysconfig |
64 |
install -d %{buildroot}%{_sbindir} |
65 |
install -d %{buildroot}%{_localstatedir}/lib/arpwatch |
66 |
install -d %{buildroot}%{_mandir}/man8 |
67 |
|
68 |
%makeinstall_std install-man |
69 |
|
70 |
for n in arp2ethers massagevendor; do |
71 |
install -m755 $n %{buildroot}%{_localstatedir}/lib/arpwatch |
72 |
done |
73 |
|
74 |
for n in *.awk *.dat; do |
75 |
install -m644 $n %{buildroot}%{_localstatedir}/lib/arpwatch |
76 |
done |
77 |
|
78 |
install -m0755 arpwatch.init %{buildroot}%{_initrddir}/arpwatch |
79 |
install -m0644 arpwatch.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/arpwatch |
80 |
|
81 |
%pre |
82 |
%_pre_useradd arpwatch %{_localstatedir}/lib/arpwatch /bin/sh |
83 |
|
84 |
%post |
85 |
%_post_service arpwatch |
86 |
|
87 |
%preun |
88 |
%_preun_service arpwatch |
89 |
|
90 |
%postun |
91 |
%_postun_userdel arpwatch |
92 |
|
93 |
%clean |
94 |
rm -rf %{buildroot} |
95 |
|
96 |
%files |
97 |
%defattr(-,root,root) |
98 |
%doc README CHANGES |
99 |
%attr(0755,root,root) %{_initrddir}/arpwatch |
100 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/arpwatch |
101 |
%{_sbindir}/* |
102 |
%{_mandir}/man*/* |
103 |
%dir %attr(0755,arpwatch,arpwatch) %{_localstatedir}/lib/arpwatch |
104 |
%config(noreplace) %{_localstatedir}/lib/arpwatch/arp.dat |
105 |
# |
106 |
# (fg) 20010403 DON'T PUT THIS AS NOREPLACE! Ethernet codes are bound to |
107 |
# change, and if ever you have a new one, submit it to arpwatch author! |
108 |
# |
109 |
%config %{_localstatedir}/lib/arpwatch/ethercodes.dat |
110 |
%{_localstatedir}/lib/arpwatch/*.awk |
111 |
%{_localstatedir}/lib/arpwatch/arp2ethers |
112 |
%{_localstatedir}/lib/arpwatch/massagevendor |
113 |
|
114 |
|