Name: PortBunny
Summary: A Linux-kernel-based port-scanner created by Recurity Labs
Version: 1.1.1
Release: 1
Group: Applications/Internet
License: GPL
URL: http://www.recurity-labs.com/portbunny/portbunny.html
Packager: Scott R. Shinn <scott@atomicrocketturtle.com>
Source: %name-%version.tar.bz2
Patch0: PortBunny-share.diff
Patch1: portbunny-noui.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Autoreqprov:    on

Requires:	python 
BuildRequires:  kernel-devel module-init-tools

%package -n     portbunny-KMP
Group:          Hardware/Other
License:        GNU General Public License (GPL)
Summary:        A Linux-kernel-based port-scanner created by Recurity Labs (Kernel Module)

%description -n portbunny-KMP
PortBunny is a Linux-kernel-based port-scanner created by Recurity Labs. Its aim is to provide a reliable and fast 
TCP-SYN-port-scanner which performs sophisticated timing based on the use of so called "trigger"-packets. The 
port-scan is performed in 2 steps: First the scanner tries to find packets, to which the target responds 
("triggers").Second, the actual port-scan is performed. During the scan, the triggers, which were found in the 
first scanning-phase, are used to determine the optimal speed at which the target may be scanned.

Authors:
--------
    fabs  <portbunny@recurity-labs.com>

%description
PortBunny is a Linux-kernel-based port-scanner created by Recurity Labs. Its aim is to provide a reliable and fast 
TCP-SYN-port-scanner which performs sophisticated timing based on the use of so called "trigger"-packets. The 
port-scan is performed in 2 steps: First the scanner tries to find packets, to which the target responds 
("triggers").Second, the actual port-scan is performed. During the scan, the triggers, which were found in the 
first scanning-phase, are used to determine the optimal speed at which the target may be scanned.

Authors:
--------
    fabs  <portbunny@recurity-labs.com>


%prep
%setup 
%patch0 -p0
%patch1 -p0

# SuSE stuff
#set -- *
#mkdir source
#mv "$@" source/
#mkdir obj

%build
# SuSE stuff
#export EXTRA_CFLAGS='-DVERSION=\"%version\"'
#for flavor in %flavors_to_build; do
#        rm -rf obj/$flavor
#        cp -r source obj/$flavor
#        make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
#                M=$PWD/obj/$flavor
#done

# 
make 


%install
# install UI
mkdir $RPM_BUILD_ROOT/usr
cp -pr source/UI/* $RPM_BUILD_ROOT/usr

export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
        make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
                M=$PWD/obj/$flavor
done

%clean

rm -rf  $RPM_BUILD_ROOT

%files 
%defattr (-,root,root)
%doc source/AUTHORS source/TODO source/LICENSE source/CHANGELOG source/README 
/usr/bin/portbunny*
/usr/share/portbunny/*

%changelog
* Mon Nov 17 2008 Scott R. Shinn <scott@atomicrocketturtle.com> - 1.1.1-1
- Initial build