packages/net/reaver/Makefile
Florian Fainelli 7eaa97f91c reaver: Fix build with external toolchains
We would not be able to search for pcap.h because CFLAGS are not passed
from src/Makefile down to src/wps/Makefile:

make[4]: Entering directory
'/home/florian/dev/openwrt/trunk/build_dir/target-mipsel-unknown-linux-gnu_glibc/reaver-1.4/src/wps'
mipsel-linux-gnu-gcc -I../utils -I ../ wps_attr_build.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps_attr_parse.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps_attr_process.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps_common.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps_dev_attr.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps_enrollee.c -c
mipsel-linux-gnu-gcc -I../utils -I ../ wps_registrar.c -c
In file included from ../misc.h:41:0,
                 from wps_registrar.c:27:
../defs.h:43:18: fatal error: pcap.h: No such file or directory
 #include <pcap.h>
                  ^
compilation terminated.
Makefile:28: recipe for target 'wps_registrar.o' failed

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-06-16 20:47:03 -07:00

54 lines
1.5 KiB
Makefile

#
# Copyright (C) 2012-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=reaver
PKG_VERSION:=1.4
PKG_RELEASE:=3
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/reaver-wps
PKG_MD5SUM:=05441dda7bacfcbe1e831c85d1ea3bc9
PKG_LICENSE:=GPL-2.0
PKG_USE_MIPS16:=0
PKG_AUTOMAKE_PATHS:=src
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
CONFIGURE_PATH:=src
MAKE_PATH:=src
EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
define Package/reaver
SECTION:=net
CATEGORY:=Network
SUBMENU:=wireless
TITLE:=Efficient brute force attack against Wifi Protected Setup
URL:=https://code.google.com/p/reaver-wps/
DEPENDS:=+libpcap +libsqlite3
endef
define Package/reaver/description
Reaver targets the external registrar functionality mandated by the WiFi
Protected Setup specification.
Access points will provide authenticated registrars with their current
wireless configuration (including the WPA PSK), and also accept a new
configuration from the registrar.
endef
define Package/reaver/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/{reaver,wash} $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/reaver
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/reaver.db $(1)/etc/reaver/
endef
$(eval $(call BuildPackage,reaver))