2008-11-18 09:26:15 +02:00
|
|
|
#
|
2009-02-17 22:21:02 +02:00
|
|
|
# Copyright (C) 2006-2009 OpenWrt.org
|
2006-06-27 03:35:46 +03:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-06-11 03:41:16 +03:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=hostapd
|
2009-11-29 18:56:38 +02:00
|
|
|
PKG_VERSION:=20091129
|
2006-06-11 03:41:16 +03:00
|
|
|
PKG_RELEASE:=1
|
2009-11-29 18:56:38 +02:00
|
|
|
PKG_REV:=be8eb8ab3ee42aa66930aea827bdcb05a2172276
|
2006-06-11 03:41:16 +03:00
|
|
|
|
2009-11-11 02:34:42 +02:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
|
2007-11-16 05:10:56 +02:00
|
|
|
PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
2009-11-11 02:34:42 +02:00
|
|
|
PKG_SOURCE_PROTO:=git
|
2006-09-24 23:49:31 +03:00
|
|
|
|
2009-04-27 18:53:00 +03:00
|
|
|
PKG_BUILD_DEPENDS:= \
|
|
|
|
PACKAGE_kmod-madwifi:madwifi \
|
|
|
|
PACKAGE_kmod-mac80211:mac80211 \
|
2009-01-27 22:05:11 +02:00
|
|
|
|
2009-04-27 18:53:00 +03:00
|
|
|
PKG_CONFIG_DEPENDS:= \
|
2009-01-27 22:05:11 +02:00
|
|
|
CONFIG_PACKAGE_kmod-ath9k \
|
|
|
|
CONFIG_PACKAGE_kmod-mac80211 \
|
|
|
|
CONFIG_PACKAGE_kmod-madwifi \
|
|
|
|
CONFIG_PACKAGE_hostapd \
|
2009-04-27 18:53:00 +03:00
|
|
|
CONFIG_PACKAGE_hostapd-mini \
|
2009-10-21 00:14:57 +03:00
|
|
|
CONFIG_PACKAGE_kmod-hostap
|
2009-01-27 22:05:11 +02:00
|
|
|
|
2009-11-11 00:00:59 +02:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
2009-04-27 18:53:00 +03:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2009-01-27 22:05:11 +02:00
|
|
|
|
|
|
|
DRIVER_MAKEOPTS= \
|
|
|
|
CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-mac80211) \
|
|
|
|
CONFIG_DRIVER_MADWIFI=$(CONFIG_PACKAGE_kmod-madwifi) \
|
2009-10-21 00:14:57 +03:00
|
|
|
CONFIG_DRIVER_HOSTAP=$(CONFIG_PACKAGE_kmod-hostap) \
|
2009-01-27 22:05:11 +02:00
|
|
|
CONFIG_IEEE80211N=$(CONFIG_PACKAGE_kmod-ath9k)
|
2006-06-11 03:41:16 +03:00
|
|
|
|
2006-09-24 23:49:31 +03:00
|
|
|
define Package/hostapd/Default
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=IEEE 802.1x Authenticator
|
|
|
|
URL:=http://hostap.epitest.fi/
|
2009-04-30 21:11:01 +03:00
|
|
|
DEPENDS:=@!TARGET_avr32 @!TARGET_etrax +PACKAGE_kmod-mac80211:libnl-tiny
|
2006-09-24 23:49:31 +03:00
|
|
|
endef
|
|
|
|
|
2006-06-18 21:10:41 +03:00
|
|
|
define Package/hostapd
|
2007-09-07 11:34:51 +03:00
|
|
|
$(call Package/hostapd/Default)
|
2006-09-24 23:49:31 +03:00
|
|
|
TITLE+= (full)
|
2009-11-11 00:00:59 +02:00
|
|
|
VARIANT:=full
|
2006-06-18 21:10:41 +03:00
|
|
|
endef
|
|
|
|
|
2007-09-07 11:34:51 +03:00
|
|
|
define Package/hostapd/description
|
2009-02-17 22:21:02 +02:00
|
|
|
This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
|
2007-09-07 11:34:51 +03:00
|
|
|
Authenticator.
|
|
|
|
endef
|
|
|
|
|
2006-06-18 21:10:41 +03:00
|
|
|
define Package/hostapd-mini
|
2007-09-07 11:34:51 +03:00
|
|
|
$(call Package/hostapd/Default)
|
2006-09-24 23:49:31 +03:00
|
|
|
TITLE+= (WPA-PSK only)
|
2009-11-11 00:00:59 +02:00
|
|
|
VARIANT:=mini
|
2006-06-18 21:10:41 +03:00
|
|
|
endef
|
|
|
|
|
2007-09-07 11:34:51 +03:00
|
|
|
define Package/hostapd-mini/description
|
2009-11-11 00:00:59 +02:00
|
|
|
This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
2006-06-18 21:10:41 +03:00
|
|
|
define Package/hostapd-utils
|
2006-09-24 23:49:31 +03:00
|
|
|
$(call Package/hostapd/Default)
|
|
|
|
TITLE+= (utils)
|
2007-09-16 19:12:20 +03:00
|
|
|
DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/hostapd-utils/description
|
2009-02-17 22:21:02 +02:00
|
|
|
This package contains a command line utility to control the
|
2007-09-07 11:34:51 +03:00
|
|
|
IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
|
2006-06-18 21:10:41 +03:00
|
|
|
endef
|
2006-06-11 03:41:16 +03:00
|
|
|
|
2009-11-23 19:12:54 +02:00
|
|
|
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
|
|
|
|
$(warning $(wildcard $(PKG_BUILD_DIR)/.config_*) != $(subst .configured_,.config_,$(STAMP_CONFIGURED)))
|
|
|
|
define Build/Configure/rebuild
|
2009-11-11 02:34:42 +02:00
|
|
|
rm -f $(PKG_BUILD_DIR)/hostapd/hostapd
|
2009-11-23 19:12:54 +02:00
|
|
|
rm -f $(PKG_BUILD_DIR)/hostapd/*.o
|
2009-11-11 02:34:42 +02:00
|
|
|
rm -f $(PKG_BUILD_DIR)/src/drivers/drivers.o
|
2009-11-23 19:12:54 +02:00
|
|
|
rm -f $(PKG_BUILD_DIR)/.config_*
|
|
|
|
touch $(subst .configured_,.config_,$(STAMP_CONFIGURED))
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(Build/Configure/rebuild)
|
2009-11-11 00:00:59 +02:00
|
|
|
$(CP) ./files/$(BUILD_VARIANT).config $(PKG_BUILD_DIR)/hostapd/.config
|
2006-06-11 03:41:16 +03:00
|
|
|
endef
|
|
|
|
|
2009-04-30 21:11:01 +03:00
|
|
|
TARGET_CPPFLAGS := \
|
|
|
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
2009-05-27 05:54:29 +03:00
|
|
|
-I$(PKG_BUILD_DIR)/src/crypto \
|
2009-04-30 21:11:01 +03:00
|
|
|
$(TARGET_CPPFLAGS) \
|
|
|
|
-I$(STAGING_DIR)/usr/include/madwifi \
|
|
|
|
-I$(STAGING_DIR)/usr/include/mac80211 \
|
2009-05-04 19:13:46 +03:00
|
|
|
-DCONFIG_LIBNL20 \
|
|
|
|
-D_GNU_SOURCE
|
2009-04-30 21:11:01 +03:00
|
|
|
|
2009-11-11 00:00:59 +02:00
|
|
|
ifdef CONFIG_PACKAGE_kmod-mac80211
|
|
|
|
TARGET_LDFLAGS += -lm -lnl-tiny
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Build/Compile
|
2009-04-30 21:11:01 +03:00
|
|
|
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
|
2009-11-11 00:00:59 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/hostapd \
|
2006-06-11 03:41:16 +03:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2009-01-27 22:05:11 +02:00
|
|
|
$(DRIVER_MAKEOPTS) \
|
2009-11-11 00:00:59 +02:00
|
|
|
LIBS="$(TARGET_LDFLAGS)" \
|
2006-06-11 03:41:16 +03:00
|
|
|
hostapd hostapd_cli
|
|
|
|
endef
|
|
|
|
|
2009-11-22 09:08:39 +02:00
|
|
|
define Package/hostapd/install
|
2009-11-11 07:15:55 +02:00
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/net
|
|
|
|
$(INSTALL_DATA) ./files/hostapd.hotplug $(1)/etc/hotplug.d/net/
|
2009-11-11 00:00:59 +02:00
|
|
|
$(INSTALL_DIR) $(1)/lib/wifi
|
|
|
|
$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd $(1)/usr/sbin/
|
2006-06-11 03:41:16 +03:00
|
|
|
endef
|
2009-11-22 09:08:39 +02:00
|
|
|
Package/hostapd-mini/install = $(Package/hostapd/install)
|
2006-06-11 03:41:16 +03:00
|
|
|
|
|
|
|
define Package/hostapd-utils/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2009-11-14 14:21:25 +02:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
|
2006-06-11 03:41:16 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,hostapd))
|
|
|
|
$(eval $(call BuildPackage,hostapd-mini))
|
|
|
|
$(eval $(call BuildPackage,hostapd-utils))
|