#
# TODO:
# - PLD it more
-# - Find more deps
-# - optflags
+# - sbin/bin - change to bin?
+# - finish ext_scripts bcond:
+# -- check python related BR and R
+# -- fix packaging python releated stuff
+# -- create subpackage for airoscript
+# -- fix directory for airoscript*.conf files
+# -- fix installation of airoscript desktop files
#
+# Conditional build:
+%bcond_without sqlite # build without sqlite support
+%bcond_without pcre # build without pcre support
+%bcond_without experimental
+%bcond_with ext_scripts # build with extra scripts (NFY)
+
+%define subver rc2
+%define rel 0.2
Summary: Reliable 802.11 (wireless) sniffer and WEP/WPA-PSK key cracker
Summary(pl.UTF-8): Pewny sniffer 802.11 (sieci bezprzewodowe) i łamacz kluczy WEP/WPA-PSK
Name: aircrack-ng
-Version: 0.9.1
-Release: 1
+Version: 1.2
+Release: %{subver}.%{rel}
License: GPL
Group: Applications/Networking
-Source0: http://download.aircrack-ng.org/%{name}-%{version}.tar.gz
-# Source0-md5: 07488ff1e178b5b7fe04c6fd78da2b96
+Source0: http://download.aircrack-ng.org/%{name}-%{version}-%{subver}.tar.gz
+# Source0-md5: ebe9d537f06f4d6956213af09c4476da
URL: http://www.aircrack-ng.org/
+Patch0: install.patch
+Patch1: pldflags.patch
+Patch2: install_besside_manual.patch
+Patch3: use_standard_sleep.patch
+BuildRequires: libnl-devel
+BuildRequires: openssl-devel
+%{?with_pcre:BuildRequires: pcre-devel}
+BuildRequires: pkgconfig
+%{?with_sqlite:BuildRequires: sqlite3-devel}
+BuildRequires: zlib-devel
+Requires: ethtool
+Requires: grep
+Requires: iw
+Requires: usbutils
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
convert, etc.).
%prep
-%setup -q
+%setup -q -n %{name}-%{version}-%{subver}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
-%{__make} \
+%{__make} -j1 \
+ %{?with_experimental: experimental=true} \
+ %{?with_ext_scripts: ext_scripts=true} \
+ %{?with_pcre: pcre=true} \
+ %{?with_sqlite: sqlite=true} \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags}"
+ PLDFLAGS="%{rpmcppflags} %{rpmcflags}"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
-for BINARY in \
- aircrack-ng \
- airdecap-ng \
- aireplay-ng \
- airodump-ng \
- airmon-ng \
- ivstools \
- makeivs \
- kstats \
- packetforge-ng
-do
- install "$BINARY" $RPM_BUILD_ROOT%{_bindir}
- install manpages/"$BINARY.1" $RPM_BUILD_ROOT%{_mandir}/man1
-done
+%{__make} install \
+ %{?with_experimental: experimental=true} \
+ %{?with_ext_scripts: ext_scripts=true} \
+ %{?with_pcre: pcre=true} \
+ %{?with_sqlite: sqlite=true} \
+ prefix=%{_prefix} \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%doc AUTHORS ChangeLog README test patches
%attr(755,root,root) %{_bindir}/aircrack-ng
%attr(755,root,root) %{_bindir}/airdecap-ng
-%attr(755,root,root) %{_bindir}/aireplay-ng
-%attr(755,root,root) %{_bindir}/airmon-ng
-%attr(755,root,root) %{_bindir}/airodump-ng
+%attr(755,root,root) %{_bindir}/airdecloak-ng
+%{?with_sqlite:%attr(755,root,root) %{_bindir}/airolib-ng}
%attr(755,root,root) %{_bindir}/ivstools
%attr(755,root,root) %{_bindir}/kstats
-%attr(755,root,root) %{_bindir}/makeivs
+%attr(755,root,root) %{_bindir}/makeivs-ng
%attr(755,root,root) %{_bindir}/packetforge-ng
+%attr(755,root,root) %{_bindir}/wpaclean
+%attr(755,root,root) %{_sbindir}/airbase-ng
+%attr(755,root,root) %{_sbindir}/aireplay-ng
+%attr(755,root,root) %{_sbindir}/airmon-ng
+%attr(755,root,root) %{_sbindir}/airodump-ng
+%attr(755,root,root) %{_sbindir}/airodump-ng-oui-update
+%attr(755,root,root) %{_sbindir}/airserv-ng
+%attr(755,root,root) %{_sbindir}/airtun-ng
%{_mandir}/man1/aircrack-ng.1*
%{_mandir}/man1/airdecap-ng.1*
-%{_mandir}/man1/aireplay-ng.1*
-%{_mandir}/man1/airmon-ng.1*
-%{_mandir}/man1/airodump-ng.1*
+%{_mandir}/man1/airdecloak-ng.1*
+%{?with_sqlite:%{_mandir}/man1/airolib-ng.1*}
+%{_mandir}/man1/besside-ng-crawler.1*
%{_mandir}/man1/ivstools.1*
%{_mandir}/man1/kstats.1*
-%{_mandir}/man1/makeivs.1*
+%{_mandir}/man1/makeivs-ng.1*
%{_mandir}/man1/packetforge-ng.1*
+%{_mandir}/man1/wpaclean.1*
+%{_mandir}/man8/airbase-ng.8*
+%{_mandir}/man8/aireplay-ng.8*
+%{_mandir}/man8/airmon-ng.8*
+%{_mandir}/man8/airodump-ng-oui-update.8*
+%{_mandir}/man8/airodump-ng.8*
+%{_mandir}/man8/airserv-ng.8*
+%{_mandir}/man8/airtun-ng.8*
+
+%if %{with experimental}
+%attr(755,root,root) %{_bindir}/buddy-ng
+%attr(755,root,root) %{_sbindir}/besside-ng
+%attr(755,root,root) %{_sbindir}/easside-ng
+%attr(755,root,root) %{_sbindir}/tkiptun-ng
+%attr(755,root,root) %{_sbindir}/wesside-ng
+%{_mandir}/man1/buddy-ng.1*
+%{_mandir}/man8/besside-ng.8*
+%{_mandir}/man8/easside-ng.8*
+%{_mandir}/man8/tkiptun-ng.8*
+%{_mandir}/man8/wesside-ng.8*
+%endif