#
# spec file for package arpwatch-ethercodes
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           arpwatch-ethercodes
BuildRequires:  arpwatch-ethercodes-build
Url:            http://standards.ieee.org/regauth/oui/
License:        BSD3c
Group:          Productivity/Networking/Diagnostic
AutoReqProv:    on
Summary:        Ethercodes Data for arpwatch
Version:        2011.6.3
Release:        1
Source:         http://standards.ieee.org/regauth/oui/oui.txt.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
OUI and company ID data as fetched from IEEE.org prepared for arpwatch.



Authors:
--------
    IEEE.org

%prep

%build
pushd /usr/share/arpwatch
bzip2 -cd ${RPM_SOURCE_DIR}/oui.txt.bz2 | \
	./massagevendor >${RPM_BUILD_DIR}/ethercodes.dat
popd
if [ ! -s ethercodes.dat ]; then
	echo "File ethercodes.dat is empty!"
	exit 1
fi

%install
mkdir -p \
	$RPM_BUILD_ROOT/%{_datadir}/arpwatch
install -m 0444 ethercodes.dat $RPM_BUILD_ROOT/%{_datadir}/arpwatch

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_datadir}/arpwatch

%changelog