File rarpd.spec of Package rarpd

#
# spec file for package rarpd (Version 1.1)
#
# Copyright (c) 2010 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:           rarpd
BuildRequires:  libnet-devel libpcap-devel
License:        MIT
Group:          Productivity/Networking/System
AutoReqProv:    on
Version:        1.1
Release:        732
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-libnet.diff
Patch1:         %{name}-%{version}-printf.diff
Patch2:         %{name}-%{version}-autoconf.diff
Patch3:         %{name}-%{version}-fix-packet-growth-bug246891.diff
Url:            ftp://ftp.dementia.org/pub/net-tools/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Reverse Address Resolution Protocol Daemon

%description
Rarpd listens on the Ethernet for broadcast packets asking for reverse
address resolution.  These packets are sent by hosts at boot time to
find out their IP addresses.

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3

%build
rm install.sh
%{suse_update_config -f}
aclocal -I cmulocal
automake -afc --foreign
autoconf -I cmulocal
CFLAGS="$RPM_OPT_FLAGS -Wall -fPIE -pie" \
	./configure \
	--prefix=%{_prefix} \
	--sbindir=%{_sbindir} \
	--sysconfdir=%{_sysconfdir} \
	--infodir=%{_infodir} \
	--mandir=%{_mandir} \
	--with-libnet=%{_prefix}
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc AUTHORS COPYING TODO
%doc %{_mandir}/man?/*
%{_sbindir}/rarpd

%changelog