File kismet.spec of Package kismet

#
# spec file for package kismet
#
# Copyright (c) 2014 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/
#


%define realver 2010-01-R1

Name:           kismet
Version:        2013_03_R1b
Release:        0
%define realver 2013-03-R1b
Summary:        An 802.11 Wireless Network Sniffer
License:        GPL-2.0+
Group:          Productivity/Networking/Diagnostic
Url:            http://www.kismetwireless.net/
Source:         %{name}-%{realver}.tar.xz
Source1:        %{name}-%{realver}.tar.xz.asc
Source2:        %{name}.keyring
Patch0:         kismet-2011-03-R2-makefile.diff
BuildRequires:  ImageMagick-devel
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  gmp-devel
%if 0%{?suse_version} >= 1230
BuildRequires:  gpg-offline
%endif
BuildRequires:  libexpat-devel
%if 0%{?suse_version} >= 1210
BuildRequires:  pkgconfig(libnl-3.0) >= 3.0
%else
BuildRequires:  libnl-devel
%endif
BuildRequires:  libpcap-devel
BuildRequires:  ncurses-devel
BuildRequires:  pcre-devel
BuildRequires:  wget
BuildRequires:  wireshark-devel
BuildRequires:  xz
Requires:       wget
Requires:       wireless-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Kismet is an 802.11 wireless network sniffer. This is different from a
normal network sniffer (such as Ethereal or tcpdump) because it
separates and identifies different wireless networks in the area.
Kismet works with any 802.11b wireless card that is capable of
reporting raw packets (rfmon support), which include any Prism2-based
cards (Linksys, D-Link, Rangelan, and more), Cisco Aironet cards, and
Orinoco-based cards. Kismet also supports the WSP100 802.11b remote
sensor by Network Chemistry and is able to monitor 802.11a networks
with cards that use the ar5k chipset.

%prep
%{?gpg_verify: %gpg_verify %{S:1}}
%setup -q -n %{name}-%{realver}
%patch0
%build
%if 0%{?suse_version} >= 1220
#This is needed as apcupsd doesn't recognize ppc64 correctly
cp /usr/share/automake-*/config.* . 
%endif
export CFLAGS="%{optflags} -Wall -fstack-protector -fno-strict-aliasing `ncurses5-config --cflags`"
export CXXFLAGS="%{optflags} -Wall -fstack-protector -fno-strict-aliasing `ncurses5-config --cflags`"
export LDFLAGS="-Wl,--as-needed"
%configure --enable-ipv6 --disable-setuid
make dep
make %{?_smp_mflags}

%install
%makeinstall

%files
%defattr(-, root, root)
%doc CHANGELOG README docs/
%{_mandir}/man?/*
%config %{_sysconfdir}/kismet.conf
%config %{_sysconfdir}/kismet_drone.conf
%{_datadir}/kismet
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by