2008-03-16 20:33:37 +02:00
|
|
|
#
|
2009-01-28 15:48:22 +02:00
|
|
|
# Copyright (C) 2008-2009 OpenWrt.org
|
2006-10-31 19:31:37 +02:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=wpa_supplicant
|
2009-03-23 18:22:56 +02:00
|
|
|
PKG_VERSION:=0.6.9
|
2009-03-28 23:30:07 +02:00
|
|
|
PKG_RELEASE:=2
|
2009-03-23 18:22:56 +02:00
|
|
|
PKG_MD5SUM:=0efb8fcedf0a8acf6f423dfdb0658fdd
|
2006-10-31 19:31:37 +02:00
|
|
|
|
2008-03-16 20:33:37 +02:00
|
|
|
PKG_SOURCE_URL:=http://hostap.epitest.fi/releases
|
2006-10-31 19:31:37 +02:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
|
2009-04-27 18:53:00 +03:00
|
|
|
PKG_BUILD_DEPENDS:= \
|
|
|
|
PACKAGE_kmod-madwifi:madwifi \
|
|
|
|
|
|
|
|
PKG_CONFIG_DEPENDS:= \
|
|
|
|
CONFIG_PACKAGE_kmod-madwifi \
|
|
|
|
CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK \
|
2008-08-10 18:49:52 +03:00
|
|
|
|
2006-10-31 19:31:37 +02:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/wpa-supplicant
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=WPA Supplicant
|
2008-07-30 20:04:50 +03:00
|
|
|
DEPENDS:=$(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),+libopenssl)
|
2006-10-31 19:31:37 +02:00
|
|
|
URL:=http://hostap.epitest.fi/wpa_supplicant/
|
|
|
|
endef
|
|
|
|
|
2007-10-14 07:34:07 +03:00
|
|
|
define Package/wpa-supplicant/Description
|
|
|
|
WPA Supplicant
|
|
|
|
endef
|
|
|
|
|
2008-07-15 04:40:55 +03:00
|
|
|
define Package/wpa-supplicant/config
|
2008-07-17 04:09:49 +03:00
|
|
|
source "$(SOURCE)/Config.in"
|
2008-07-15 04:40:55 +03:00
|
|
|
endef
|
|
|
|
|
2006-10-31 19:31:37 +02:00
|
|
|
define Package/wpa-cli
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
DEPENDS:=wpa-supplicant
|
|
|
|
TITLE:=WPA Supplicant command line interface
|
2007-10-14 07:34:07 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wpa-cli/Description
|
2009-01-28 15:48:22 +02:00
|
|
|
WPA Supplicant control utility
|
2006-10-31 19:31:37 +02:00
|
|
|
endef
|
|
|
|
|
2008-07-15 04:40:55 +03:00
|
|
|
CONFIG=$(firstword $(wildcard ./files/config.$(BOARD) ./files/config.$(ARCH) ./config))
|
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/madwifi $(if $(CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK),-DNO_TIMESTAMP_CHECK)
|
|
|
|
|
2006-10-31 19:31:37 +02:00
|
|
|
define Build/Configure
|
2008-07-15 04:40:55 +03:00
|
|
|
cp $(CONFIG) $(PKG_BUILD_DIR)/wpa_supplicant/.config
|
2009-08-20 18:58:55 +03:00
|
|
|
[ -f $(STAMP_CONFIGURED) ] || $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant clean
|
|
|
|
rm -f $(PKG_BUILD_DIR)/.configured*
|
2008-07-15 04:40:55 +03:00
|
|
|
$(if $(CONFIG_PACKAGE_kmod-madwifi),,$(SED) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
|
2009-05-31 00:48:54 +03:00
|
|
|
$(if $(CONFIG_PACKAGE_kmod-hostap),,$(SED) 's,^CONFIG_DRIVER_HOSTAP,#CONFIG_DRIVER_HOSTAP,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
|
2008-07-30 20:04:50 +03:00
|
|
|
$(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),$(SED) 's|^CONFIG_TLS.*|CONFIG_TLS=openssl|g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
|
2006-10-31 19:31:37 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
rm -rf $(PKG_INSTALL_DIR)
|
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
2008-06-01 03:10:26 +03:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2008-07-15 04:40:55 +03:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant \
|
2006-10-31 19:31:37 +02:00
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
KERNEL=$(LINUX_DIR) \
|
2007-03-28 03:35:26 +03:00
|
|
|
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2006-10-31 19:31:37 +02:00
|
|
|
all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wpa-supplicant/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2008-07-15 04:40:55 +03:00
|
|
|
$(CP) \
|
|
|
|
$(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant \
|
|
|
|
$(PKG_BUILD_DIR)/wpa_supplicant/wpa_passphrase \
|
|
|
|
$(1)/usr/sbin/
|
2008-08-12 17:22:42 +03:00
|
|
|
$(INSTALL_DIR) $(1)/lib/wifi
|
|
|
|
$(INSTALL_DATA) ./files/wpa_supplicant.sh $(1)/lib/wifi/wpa_supplicant.sh
|
2006-10-31 19:31:37 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wpa-cli/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2008-07-18 18:28:24 +03:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli $(1)/usr/sbin/
|
2006-10-31 19:31:37 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,wpa-supplicant))
|
|
|
|
$(eval $(call BuildPackage,wpa-cli))
|