2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_REV
:=dc6d9ac250f793a62b21ca828445967fb484305f
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=git
://w1.fi
/srv
/git
/hostap.git
17 PKG_SOURCE_SUBDIR
:=hostapd-
$(PKG_VERSION
)
18 PKG_SOURCE_VERSION
:=$(PKG_REV
)
22 PACKAGE_kmod-madwifi
:madwifi \
23 PACKAGE_kmod-mac80211
:mac80211 \
25 PKG_CONFIG_DEPENDS
:= \
26 CONFIG_PACKAGE_kmod-ath9k \
27 CONFIG_PACKAGE_kmod-mac80211 \
28 CONFIG_PACKAGE_kmod-madwifi \
29 CONFIG_PACKAGE_hostapd \
30 CONFIG_PACKAGE_hostapd-mini \
31 CONFIG_PACKAGE_kmod-hostap
33 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
35 include $(INCLUDE_DIR
)/package.mk
38 CONFIG_DRIVER_NL80211
=$(CONFIG_PACKAGE_kmod-mac80211
) \
39 CONFIG_DRIVER_MADWIFI
=$(CONFIG_PACKAGE_kmod-madwifi
) \
40 CONFIG_DRIVER_HOSTAP
=$(CONFIG_PACKAGE_kmod-hostap
) \
41 CONFIG_IEEE80211N
=$(CONFIG_PACKAGE_kmod-ath9k
)
43 define Package
/hostapd
/Default
46 TITLE
:=IEEE
802.1x Authenticator
47 URL
:=http
://hostap.epitest.fi
/
48 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
+PACKAGE_kmod-mac80211
:libnl-tiny
51 define Package
/hostapd
52 $(call Package
/hostapd
/Default
)
57 define Package
/hostapd
/description
58 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
62 define Package
/hostapd-mini
63 $(call Package
/hostapd
/Default
)
64 TITLE
+= (WPA-PSK only
)
68 define Package
/hostapd-mini
/description
69 This package contains a minimal IEEE
802.1x
/WPA Authenticator
(WPA-PSK only
).
72 define Package
/hostapd-utils
73 $(call Package
/hostapd
/Default
)
75 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
78 define Package
/hostapd-utils
/description
79 This package contains a command line utility to control the
80 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
83 define Build
/Configure
84 rm -f
$(PKG_BUILD_DIR
)/hostapd
/hostapd
85 rm -f
$(PKG_BUILD_DIR
)/src
/drivers
/drivers.o
86 $(CP
) .
/files
/$(BUILD_VARIANT
).config
$(PKG_BUILD_DIR
)/hostapd
/.config
90 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
91 -I
$(PKG_BUILD_DIR
)/src
/crypto \
93 -I
$(STAGING_DIR
)/usr
/include/madwifi \
94 -I
$(STAGING_DIR
)/usr
/include/mac80211 \
98 ifdef CONFIG_PACKAGE_kmod-mac80211
99 TARGET_LDFLAGS
+= -lm
-lnl-tiny
103 CFLAGS
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
104 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd \
105 $(TARGET_CONFIGURE_OPTS
) \
107 LIBS
="$(TARGET_LDFLAGS)" \
111 define Package
/InstallTemplate
112 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/net
113 $(INSTALL_DATA
) .
/files
/hostapd.hotplug
$(1)/etc
/hotplug.d
/net
/
114 $(INSTALL_DIR
) $(1)/lib
/wifi
115 $(INSTALL_DATA
) .
/files
/hostapd.sh
$(1)/lib
/wifi
/hostapd.sh
116 $(INSTALL_DIR
) $(1)/usr
/sbin
117 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd
/hostapd
$(1)/usr
/sbin
/
120 ifeq ($(BUILD_VARIANT
),full
)
121 Package
/hostapd
/install = $(Package
/InstallTemplate
)
123 Package
/hostapd-mini
/install = $(Package
/InstallTemplate
)
126 define Package
/hostapd-utils
/install
127 $(INSTALL_DIR
) $(1)/usr
/sbin
128 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
131 $(eval
$(call BuildPackage
,hostapd
))
132 $(eval
$(call BuildPackage
,hostapd-mini
))
133 $(eval
$(call BuildPackage
,hostapd-utils
))