hostapd: merge an upstream patch for pmksa cache
[openwrt/svn-archive/archive.git] / package / network / services / hostapd / Makefile
index 8fcc241c9501d62a2e34ba264c1a2bea6cc76982..f8c76cae12150a7b9cff0450d2d6c437c86271af 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2012 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_VERSION:=20130707
+PKG_VERSION:=2014-06-03
 PKG_RELEASE:=1
-PKG_REV:=d2ba3d6bd9336ef8fd761a0cc7999824d4c4da41
+PKG_REV:=84df167554569af8c87f0a8ac1fb508192417d8e
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=$(PKG_REV)
 PKG_SOURCE_PROTO:=git
-PKG_MIRROR_MD5SUM:=5dff9bc3b8fbd9ef8a66273d5adee5a3
+# PKG_MIRROR_MD5SUM:=4e7c1f97edd7514535056fce54ae053a
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
 
@@ -86,6 +86,11 @@ ifneq ($(LOCAL_TYPE),hostapd)
        CONFIG_DRIVER_ROBOSWITCH=$(CONFIG_PACKAGE_kmod-switch)
 endif
 
+ifdef CONFIG_USE_EGLIBC
+  TARGET_LDFLAGS += -lrt
+  TARGET_LDFLAGS_C += -lrt
+endif
+
 DRV_DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny @(!TARGET_avr32||BROKEN)
 
 define Package/hostapd/Default
@@ -208,6 +213,26 @@ define Package/wpa-cli/Description
   WPA Supplicant control utility
 endef
 
+define Package/hostapd-common
+  TITLE:=hostapd/wpa_supplicant common support files
+  SECTION:=net
+  CATEGORY:=Network
+endef
+
+define Package/hostapd-common-old
+  TITLE:=hostapd/wpa_supplicant common support files (legacy drivers)
+  SECTION:=net
+  CATEGORY:=Network
+endef
+
+define Package/eapol-test
+  TITLE:=802.1x authentication test utility
+  SECTION:=net
+  CATEGORY:=Network
+  VARIANT:=supplicant-full
+  DEPENDS:=$(DRV_DEPENDS)
+endef
+
 
 ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
   define Build/Configure/rebuild
@@ -252,6 +277,7 @@ define Build/RunMake
                $(TARGET_CONFIGURE_OPTS) \
                $(DRIVER_MAKEOPTS) \
                LIBS="$(TARGET_LDFLAGS)" \
+               LIBS_c="$(TARGET_LDFLAGS_C)" \
                BCHECK= \
                $(2)
 endef
@@ -292,20 +318,34 @@ define Build/Compile/supplicant
        )
 endef
 
+define Build/Compile/supplicant-full
+       $(call Build/RunMake,wpa_supplicant, \
+               eapol_test \
+       )
+endef
+
 define Build/Compile
        $(Build/Compile/$(LOCAL_TYPE))
+       $(Build/Compile/$(BUILD_VARIANT))
 endef
 
 define Install/hostapd
-       $(INSTALL_DIR) $(1)/lib/wifi
-       $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh
        $(INSTALL_DIR) $(1)/usr/sbin
 endef
 
 define Install/supplicant
+       $(INSTALL_DIR) $(1)/usr/sbin
+endef
+
+define Package/hostapd-common/install
+       $(INSTALL_DIR) $(1)/lib/netifd
+       $(INSTALL_DATA) ./files/netifd.sh $(1)/lib/netifd/hostapd.sh
+endef
+
+define Package/hostapd-common-old/install
        $(INSTALL_DIR) $(1)/lib/wifi
+       $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh
        $(INSTALL_DATA) ./files/wpa_supplicant.sh $(1)/lib/wifi/wpa_supplicant.sh
-       $(INSTALL_DIR) $(1)/usr/sbin
 endef
 
 define Package/hostapd/install
@@ -345,6 +385,13 @@ ifneq ($(LOCAL_TYPE),hostapd)
   endef
 endif
 
+ifeq ($(BUILD_VARIANT),supplicant-full)
+  define Package/eapol-test/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
+  endef
+endif
+
 $(eval $(call BuildPackage,hostapd))
 $(eval $(call BuildPackage,hostapd-mini))
 $(eval $(call BuildPackage,wpad))
@@ -354,3 +401,6 @@ $(eval $(call BuildPackage,wpa-supplicant-mini))
 $(eval $(call BuildPackage,wpa-supplicant-p2p))
 $(eval $(call BuildPackage,wpa-cli))
 $(eval $(call BuildPackage,hostapd-utils))
+$(eval $(call BuildPackage,hostapd-common))
+$(eval $(call BuildPackage,hostapd-common-old))
+$(eval $(call BuildPackage,eapol-test))