0269c86
%global _version	2013-03-R1
77c40ea
1ac0a1f
## {Local macros...
1ac0a1f
%global cfgdir		%_sysconfdir/%name
1ac0a1f
%global _rpmversion	0.0.%(echo %_version | tr - .)
1ac0a1f
## ...local macros}
1ac0a1f
1a86676
%{!?apply:%global  apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p%%{-p*}} %%{-b:-b%%{-b*}} \
1a86676
%nil}
1ac0a1f
1ac0a1f
Summary:	WLAN detector, sniffer and IDS
1ac0a1f
Name:		kismet
1ac0a1f
Version:	%_rpmversion
8b081be
Release:	3%{?dist}
5825008
License:	GPLv2+
1ac0a1f
Group:		Applications/Internet
1ac0a1f
URL:		http://www.kismetwireless.net/
0269c86
Source0:	http://www.kismetwireless.net/code/%{name}-%_version.tar.gz
d812e76
Source1:	http://www.kismetwireless.net/code/%{name}-%_version.tar.gz.asc
4aa6d5e
4aa6d5e
Source12:	kismet_capture.pam
4aa6d5e
Source13:	kismet_capture.console
4aa6d5e
cdc6bb5
#Patch17:	kismet-2009-06-R1-perms.patch
4aa6d5e
Patch18:	kismet-2009-06-R1-envp.patch
4aa6d5e
d812e76
BuildRoot:	%_tmppath/%{name}-%{version}-%{release}-root
4aa6d5e
BuildRequires:	ncurses-devel diffutils
4aa6d5e
BuildRequires:	libpcap-devel pcre-devel
0269c86
BuildRequires:	openssl-devel libcap-devel libnl3-devel
0269c86
BuildRequires:	bluez-libs-devel
4aa6d5e
Requires:	usermode
4aa6d5e
24776c7
Obsoletes:	kismet-extras < 0.0.2009.06.R1
24776c7
4aa6d5e
# HACK: work around https://fedorahosted.org/usermode/ticket/1
4aa6d5e
Source50:	kismet_capture_wrap.c
4aa6d5e
4aa6d5e
4aa6d5e
%package plugins
4aa6d5e
Summary:	Plugins for kismet
1ac0a1f
Group:		Applications/Internet
d812e76
Requires:	%{name} = %{version}-%{release}
1ac0a1f
1ac0a1f
1ac0a1f
%description
1ac0a1f
Kismet is an 802.11 layer2 wireless network detector, sniffer, and
1ac0a1f
intrusion detection system. Kismet will work with any wireless card
1ac0a1f
which supports raw monitoring (rfmon) mode, and can sniff 802.11b,
1ac0a1f
802.11a, and 802.11g traffic.
1ac0a1f
1ac0a1f
Kismet identifies networks by passively collecting packets and detecting
1ac0a1f
standard named networks, detecting (and given time, decloaking) hidden
1ac0a1f
networks, and infering the presence of nonbeaconing networks via data
1ac0a1f
traffic.
1ac0a1f
4aa6d5e
%description plugins
1ac0a1f
Kismet is an 802.11 layer2 wireless network detector, sniffer, and
1ac0a1f
intrusion detection system. Kismet will work with any wireless card
1ac0a1f
which supports raw monitoring (rfmon) mode, and can sniff 802.11b,
1ac0a1f
802.11a, and 802.11g traffic.
1ac0a1f
4aa6d5e
This subpackage contains plugins shipped by the kismet package.
1ac0a1f
1ac0a1f
1ac0a1f
%prep
0269c86
%setup -q -c -n %{name}-%_version
cdc6bb5
#%apply -n17 -p1
1a86676
%apply -n18 -p1
1ac0a1f
5f3bbfa
/bin/cp -a /usr/lib/rpm/config.sub .
5f3bbfa
d812e76
sed -i 's!\$(prefix)/lib/!%{_libdir}/!g' plugin-*/Makefile
a896300
a896300
d812e76
# set our 'kismet' user, disable GPS and log into %%logdir by
1ac0a1f
# default
4aa6d5e
sed -i \
f0fe207
    -e '\!^ouifile=/etc/manuf!d' \
f0fe207
    -e '\!^ouifile=/usr/share/wireshark/wireshark/manuf!d' \
4aa6d5e
    conf/kismet.conf.in conf/kismet_drone.conf
1ac0a1f
1ac0a1f
1ac0a1f
%build
1ac0a1f
export ac_cv_lib_uClibcpp_main=no	# we do not want to build against uClibc++, even when available
7ca63d1
export LDFLAGS='-Wl,--as-needed'
1a86676
%configure \
1a86676
	   --sysconfdir=%cfgdir \
1a86676
	   CXXFLAGS="$RPM_OPT_FLAGS -D__STDC_FORMAT_MACROS"
1ac0a1f
1ac0a1f
# HOME will be set to @srcdir@ which is disturbing distcc
1ac0a1f
make clean
1ac0a1f
make %{?_smp_mflags} HOME="$HOME"
1ac0a1f
0269c86
for i in plugin-{alertsyslog,btscan,spectools,syslog}; do
4aa6d5e
    make -C $i KIS_SRC_DIR=`pwd` \
a896300
	 CXX='%__cxx' CC='%__cc' LD='%__cxx' \
4aa6d5e
	 CFLAGS="-I\$(KIS_SRC_DIR) -fPIC $RPM_OPT_FLAGS" \
a896300
	 PLUGINLDFLAGS="-shared -rdynamic -Wl,--as-needed"
4aa6d5e
done
4aa6d5e
4aa6d5e
4aa6d5e
# HACK: work around https://fedorahosted.org/usermode/ticket/1
d812e76
%__cc $RPM_OPT_FLAGS %SOURCE50 -o kismet_capture.wrap
4aa6d5e
1ac0a1f
1ac0a1f
%install
4aa6d5e
rm -rf $RPM_BUILD_ROOT _tmp
4aa6d5e
0269c86
for i in . plugin-{alertsyslog,btscan,spectools,syslog}; do
a896300
    make -C $i install	\
a896300
        KIS_SRC_DIR=`pwd` \
1ac0a1f
	DESTDIR="$RPM_BUILD_ROOT" \
1ac0a1f
	INSTUSR="$(id -un)" INSTGRP="$(id -gn)" MANGRP="$(id -gn)"
4aa6d5e
done
1ac0a1f
d812e76
install -d $RPM_BUILD_ROOT{%homedir,%crontabdir,%{_libdir}/kismet{,_client},%{_libexecdir},%{_sysconfdir}/{sysconfig,pam.d,security/console.apps}}
1ac0a1f
d812e76
install -p -m 0644 %SOURCE12     $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kismet_capture
d812e76
install -p -m 0644 %SOURCE13     $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kismet_capture
d812e76
install -p -m 0755 kismet_capture $RPM_BUILD_ROOT%{_libexecdir}/
1ac0a1f
d812e76
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/kismet*/*.so
4aa6d5e
4aa6d5e
d812e76
#ln -s ./consolehelper            $RPM_BUILD_ROOT%{_bindir}/kismet_capture
d812e76
install -p -m 0755 kismet_capture.wrap $RPM_BUILD_ROOT%{_bindir}/kismet_capture
1ac0a1f
1ac0a1f
1ac0a1f
%clean
1ac0a1f
rm -rf $RPM_BUILD_ROOT
1ac0a1f
1ac0a1f
1ac0a1f
%files
1ac0a1f
%defattr(-,root,root,-)
cdc6bb5
%doc CHANGELOG* README docs
4aa6d5e
%dir %attr(0755,root,root) %cfgdir
1ac0a1f
%config(noreplace) %cfgdir/*
d812e76
%{_bindir}/kismet*
d812e76
%{_datadir}/kismet
d812e76
%{_mandir}/*/kismet*
1ac0a1f
d812e76
%dir %{_libdir}/kismet
d812e76
%dir %{_libdir}/kismet_client
1ac0a1f
d812e76
%config(noreplace) %{_sysconfdir}/pam.d/*
d812e76
%{_sysconfdir}/security/console.apps/*
d812e76
%{_libexecdir}/*
1ac0a1f
4aa6d5e
4aa6d5e
%files plugins
1ac0a1f
%defattr(-,root,root,-)
d812e76
%{_libdir}/kismet/*.so
d812e76
%{_libdir}/kismet_client/*.so
1ac0a1f
1ac0a1f
1ac0a1f
%changelog
8b081be
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2013.03.R1-3
8b081be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8b081be
d353926
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2013.03.R1-2
d353926
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d353926
0269c86
* Wed Mar 27 2013 Jon Ciesla <limburgher@gmail.com> - 0.0.2013.03.R1-1
0269c86
- Latest stable upstream.
0269c86
- Changed to libnl3
0269c86
32d8718
* Tue Mar 12 2013 Jon Ciesla <limburgher@gmail.com> - 0.0.2011.03.R2-1607.20120307git6b8b77
32d8718
- Revert pthread link flag change.
32d8718
cdc6bb5
* Thu Mar 07 2013 Jon Ciesla <limburgher@gmail.com> - 0.0.2011.03.R2-1606.20120307git6b8b77
cdc6bb5
- Upgrade to latest git snapshot, BZ 917276.
cdc6bb5
d812e76
* Fri Mar 01 2013 Jon Ciesla <limburgher@gmail.com> - 0.0.2011.03.R2-1605
d812e76
- Spec cleanup.
d812e76
- Switch from dietlibc to glibc.
d812e76
5bca4fc
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2011.03.R2-1604
5bca4fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5bca4fc
9820ab3
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2011.03.R2-1603
9820ab3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9820ab3
4b4f909
* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 0.0.2011.03.R2-1602
4b4f909
- Rebuild against PCRE 8.30
08de8a9
- Fix %%files section for plugins
4b4f909
a52a201
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2011.03.R2-1601
a52a201
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a52a201
Enrico Scholz 06d6609
* Sat Apr 23 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2011.03.R2-1600
Enrico Scholz 06d6609
- updated to 2011-03-R2
Enrico Scholz 06d6609
Enrico Scholz cee9c3e
* Sat Apr  2 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2011.03.R1-1600
Enrico Scholz cee9c3e
- updated to 2011-03-R1 (#692715)
Enrico Scholz cee9c3e
77bebff
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2010.07.R1-1501
77bebff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
77bebff
Enrico Scholz 2fd798e
* Mon Aug 16 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2010.07.R1-1500
Enrico Scholz 2fd798e
- updated to 2010-07-R1; rediffed patches
Enrico Scholz 2fd798e
e9087d7
* Sun Feb 21 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2010.01.R1-1400
60d3e1b
- added patch to honor listen configuration (#553275)
60d3e1b
1a86676
* Sat Jan 16 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2010.01.R1-1300
1a86676
- updated to 2010-01-R1
1a86676
- rediffed patches
1a86676
a896300
* Sun Dec  6 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2009.11.R1-1300
a896300
- updated to 2009-11-R1
a896300
b5dd270
* Sun Aug  9 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
b5dd270
- enhanced kismet_capture's pam configuration file
b5dd270
24776c7
* Sun Aug  9 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2009.06.R1-1
24776c7
- added Obsoletes: entry for old -extras subpackage
24776c7
4aa6d5e
* Sun Aug  9 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2009.06.R1-0
4aa6d5e
- updated to 2009-06-R1
4aa6d5e
- reworked large parts of the package due to major upstream changes:
4aa6d5e
  * there is no separate user anymore but a kismet_capture consolehelper wrapper
4aa6d5e
  * a lot of the old filesystem layout has been changed/removed
4aa6d5e
  * removed -extras subpackage; added -plugins one
4aa6d5e
1bcc682
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2008.05.R1-6
1bcc682
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1bcc682
694f255
* Wed Mar 18 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.0.2008.05.R1-5
694f255
- Add patch to fix build against GCC 4.4 (#490811)
694f255
b5fd187
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2008.05.R1-4
b5fd187
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b5fd187
5825008
* Tue Aug  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.0.2008.05.R1-3
5825008
- fix license tag
5825008
2c1f7a0
* Sat Jun 21 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2008.05.R1-2
2c1f7a0
- applied forgotten patch
3272597
- honor $NO_TMPWATCH instead of $NO_LOGROTATE in the tmpwatch script (#427262)
2c1f7a0
73623bc
* Sat Jun 21 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2008.05.R1-1
73623bc
- updated to 2008-05-R1
73623bc
- removed some patches and added new ones
73623bc
Caolan McNamara 49e85cd
* Fri Jun 06 2008 Caolán McNamara <caolanm@redhat.com> - 0.0.2007.10.R1-4
Caolan McNamara 49e85cd
- tweak configure to use -lMagickCore not -lMagick to rebuild for dependancies
Caolan McNamara 49e85cd
67fedbe
* Fri Feb 22 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2007.10.R1-3
67fedbe
- fixed build with gcc43 (#434084, thx to Erik van Pienbroek)
67fedbe
67fedbe
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org>
ccfb0fb
- Autorebuild for GCC 4.3
ccfb0fb
40043b5
* Sat Nov 10 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2007.10.R1-2
40043b5
- rebuilt for new libexpat
40043b5
034ff37
* Mon Oct  8 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2007.10.R1-1
034ff37
- updated to 2007-10-R1
034ff37
- dropped/rediffed patches
034ff37
- added BR on dbus-devel
034ff37
af8fc07
* Sun Feb  4 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2007.01.R1b-7
af8fc07
- further x86_64 fixes for printf() format-string modifiers
af8fc07
dd81128
* Sat Feb  3 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2007.01.R1b-6
7ca63d1
- updated to 2007-01-R1b
dd81128
- removed most patches which were applied upstream; rediffed remaining
dd81128
  ones
7ca63d1
- added -setgroups patch
7ca63d1
- added libpcap-devel BR; removed the glib-devel + bzip2-devel one
7ca63d1
- build with '-Wl,--as-needed'
7ca63d1
c62b079
* Fri Sep 15 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2006.04.R1-4
c62b079
- rebuilt
c62b079
77c40ea
* Sun Jul  9 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2006.04.R1-3
77c40ea
- use new fedora-usermgmt code
77c40ea
1ac0a1f
* Sat Apr 29 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2006.04.R1-2
1ac0a1f
- fixed compilation problems on AMD64 introduced by my -alias patch
1ac0a1f
  (reported by Hans de Goede)
1ac0a1f
- fixed ssize_t vs. int problem on AMD64 (found and reported by Hans
1ac0a1f
  de Goede)
1ac0a1f
- initial import into Fedora Extra (review #165314)
b91a7b8
- added 'freetype-devel' BR which is required for -devel branch
1ac0a1f
1ac0a1f
* Sat Apr 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2006.04.R1-1
1ac0a1f
- updated to 2006-04-R1
1ac0a1f
- fixed/improved some ./configure checks
1ac0a1f
- removed the starting 'A' from the summary
1ac0a1f
- added a bunch of patches fixing compiler warnings
1ac0a1f
1ac0a1f
* Fri Mar 17 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2005.08.R1-3
1ac0a1f
- fixed the usermgmt in the %%postun script: test for uninstallation
1ac0a1f
  and swap order of user- and groupdel operations
1ac0a1f
- moved logs to /var/log/kismet
1ac0a1f
- placed status information directly under /var/lib/kismet instead of
1ac0a1f
  /var/lib/kismet/.kismet
1ac0a1f
- added /etc/cron.dail/tmpwatch.kismet to cleanup the generated
1ac0a1f
  logfiles; used tmpwatch because kismet creates new, differently
1ac0a1f
  named logfiles.
1ac0a1f
- added -jobcontrol patch
1ac0a1f
1ac0a1f
* Thu Mar 16 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2005.08.R1-2
1ac0a1f
- set *USR and *GRP variables to avoid problems with certain 'install'
1ac0a1f
  versions
1ac0a1f
1ac0a1f
* Thu Aug 18 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2005.08.R1-1
1ac0a1f
- updated to 2005-08-R1 (SECURITY)
1ac0a1f
- do not use 'subst()' in %%prep anymore; the files *will* be touched
1ac0a1f
  so we do not need to care about the timestamp
1ac0a1f
- fixed copy&paste error in the gecos entry of the 'kismet' user
1ac0a1f
1ac0a1f
* Sun Aug  7 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2005.07.R1a-1
1ac0a1f
- updated to 2005-07-R1a
1ac0a1f
1ac0a1f
* Sat Jul  9 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.0.2005.06.R1-1
1ac0a1f
- Initial build.
1ac0a1f
1ac0a1f
1ac0a1f
## Local Variables:
1ac0a1f
## outline-regexp: "##\\s-*{.*\\.\\.\\."
1ac0a1f
## outline-heading-end-regexp: "##\\s-*\\.\\.\\..*}"
1ac0a1f
## End: