hostapd: correctly handle macfile uci option
[openwrt.git] / package / network / services / hostapd / Makefile
index 44b6684..485a8fa 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_VERSION:=20120910
+PKG_VERSION:=20130405
 PKG_RELEASE:=1
-PKG_REV:=762b99db7a76803d1ad274e87caa6fe870d47441
+PKG_REV:=f2f66ad7e805218468aa041985dccaf8719c296e
 
 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:=fa3227c146cb50732fe8511ce6d1d862
+PKG_MIRROR_MD5SUM:=5dff9bc3b8fbd9ef8a66273d5adee5a3
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
 
@@ -93,7 +93,7 @@ define Package/hostapd/Default
   CATEGORY:=Network
   TITLE:=IEEE 802.1x Authenticator
   URL:=http://hostap.epitest.fi/
-  DEPENDS:=$(DRV_DEPENDS)
+  DEPENDS:=$(DRV_DEPENDS) +libubus
 endef
 
 define Package/hostapd
@@ -138,7 +138,7 @@ endef
 define Package/wpad
 $(call Package/wpad/Default)
   TITLE+= (full)
-  DEPENDS:=$(DRV_DEPENDS) +WPA_SUPPLICANT_OPENSSL:libopenssl
+  DEPENDS:=$(DRV_DEPENDS) +WPA_SUPPLICANT_OPENSSL:libopenssl +libubus
   VARIANT:=wpad-full
 endef
 
@@ -150,7 +150,7 @@ endef
 define Package/wpad-mini
 $(call Package/wpad/Default)
   TITLE+= (WPA-PSK only)
-  DEPENDS:=$(DRV_DEPENDS)
+  DEPENDS:=$(DRV_DEPENDS) +libubus
   VARIANT:=wpad-mini
 endef
 
@@ -218,13 +218,16 @@ TARGET_CPPFLAGS := \
        -I$(STAGING_DIR)/usr/include/libnl-tiny \
        -I$(PKG_BUILD_DIR)/src/crypto \
        $(TARGET_CPPFLAGS) \
-       -I$(STAGING_DIR)/usr/include/madwifi \
+       -I$(CURDIR)/madwifi \
        -DCONFIG_LIBNL20 \
        -D_GNU_SOURCE \
        $(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections
+ifeq ($(findstring supplicant,$(BUILD_VARIANT)),)
+  TARGET_LDFLAGS += -lubox -lubus
+endif
 
 ifdef CONFIG_PACKAGE_kmod-mac80211
   TARGET_LDFLAGS += -lm -lnl-tiny
@@ -303,6 +306,11 @@ ifneq ($(LOCAL_TYPE),supplicant)
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/hotplug.d/button
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
        $(INSTALL_DATA) ./files/wps-hotplug.sh $(1)/etc/hotplug.d/button/50-wps
+       $(if $(CONFIG_PROCD_INIT),
+               $(INSTALL_DIR) $(1)/etc/rc.button/
+               $(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps,
+               $(INSTALL_DATA) ./files/wps-hotplug.sh $(1)/etc/hotplug.d/button/50-wps
+       )
   endef
 endif