File ip-sentinel.spec of Package ipsentinel
#
# spec file for package ip-sentinel
#
# Copyright (c) 2008 SOAD Project, Russia.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bug fixes or comments to Maintainer:
# sda00@himki.net
#
# norootforbuild
Name: ip-sentinel
Version: 0.12
Release: SOAD.1
Summary: ip-sentinel tries to prevent unauthorized usage of IPs within the local ethernet
License: GPL
Group: Network/Tools
URL: https://savannah.nongnu.org/projects/ip-sentinel
Source: %{name}-%{version}.tar.bz2
Source1: ip-sentinel.samples.tar.bz2
#Patch: cui.cpp.patch
BuildRequires: gcc-c++
BuildRequires: libpcap-devel
BuildRequires: libpcap
BuildRequires: ncurses-devel ncurses zlib zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This program tries to prevent unauthorized usage of IPs within the local
ethernet broadcastdomain by giving an answer to ARP-requests. After receiving
such a faked reply, the requesting party stores the told MAC in its ARP-table
and will send future packets to this MAC. Because this MAC is invalid, the
host with the invalid IP can not be reached.
Author:
Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
%prep
rm -rf "$RPM_BUILD_ROOT"
%{?suse_update_config:%{suse_update_config -f}}
%build
%install
tar xfm $RPM_SOURCE_DIR/%{name}-%{version}.tar.bz2
cd %{name}-%{version}
#patch -p0 < $RPM_SOURCE_DIR/cui.cpp.patch
# %__sed -i -e 's|-shared|-shared -fPIC|g' \
# Makefile.in
#%__sed -i -e 's|-Wall|-Wall -fPIC|g' \
# Makefile.in
#mkdir -p %{buildroot}/usr/bin
#mkdir -p %{buildroot}/usr/share/man/man8
%configure
make
make DESTDIR=$RPM_BUILD_ROOT install
# we don't need .a and .la files
find %{buildroot}/ -type f -iname '*.la' -exec %__rm {} \;
find %{buildroot}/ -type f -iname '*.a' -exec %__rm {} \;
## find $RPM_BUILD_ROOT/ -type f -perm 755 -exec strip -s {} \;
mkdir -p $RPM_BUILD_ROOT/usr/share/ip-sentinel
cd $RPM_BUILD_ROOT/usr/share/ip-sentinel
tar xfm $RPM_SOURCE_DIR/ip-sentinel.samples.tar.bz2
# done by doc-macro
#%__rm -r %{buildroot}/%{_datadir}/doc
%clean
rm -rf "$RPM_BUILD_ROOT"
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
/usr/sbin/ip-sentinel
%dir %{_datadir}/ip-sentinel
%{_datadir}/ip-sentinel/*
%{_mandir}/man8/*
#%doc COPYING Changelog README TODO
#%{_libdir}/xmms/General/libxmms_osd.so
# /usr/bin/ip-sentinel
#%{_bindir}/*
#/usr/share/man/man8/ip-sentinel.8.gz
# need to exclude all debuginfo-related files from the package
# %exclude /ip-sentinel/*
%changelog
* Wed Nov 18 2008 SOAD project <sda00@himki.net> - 0.12
- first build for SUSE