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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
/
16 PKG_SOURCE_SUBDIR
:=hostapd-
$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=$(PKG_REV
)
18 PKG_MD5SUM
:=83630d11fa66ade9091f1b304fccd74c
21 PACKAGE_kmod-madwifi
:madwifi \
22 PACKAGE_kmod-mac80211
:mac80211 \
23 PACKAGE_kmod-mac80211
:libnl \
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 \
32 include $(INCLUDE_DIR
)/package.mk
35 CONFIG_DRIVER_NL80211
=$(CONFIG_PACKAGE_kmod-mac80211
) \
36 CONFIG_DRIVER_MADWIFI
=$(CONFIG_PACKAGE_kmod-madwifi
) \
37 CONFIG_IEEE80211N
=$(CONFIG_PACKAGE_kmod-ath9k
)
39 define Package
/hostapd
/Default
42 TITLE
:=IEEE
802.1x Authenticator
43 URL
:=http
://hostap.epitest.fi
/
44 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
47 define Package
/hostapd
48 $(call Package
/hostapd
/Default
)
50 DEPENDS
+= +PACKAGE_hostapd
:libopenssl
53 #define Package/hostapd/conffiles
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
)
67 #define Package/hostapd-mini/conffiles
71 define Package
/hostapd-mini
/description
72 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
76 define Package
/hostapd-utils
77 $(call Package
/hostapd
/Default
)
79 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
82 define Package
/hostapd-utils
/description
83 This package contains a command line utility to control the
84 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
87 define Build
/ConfigureTarget
88 rm -rf
$(PKG_BUILD_DIR
)/hostapd.
$(1)
89 mkdir
-p
$(PKG_BUILD_DIR
)/hostapd.
$(1)
91 $(PKG_BUILD_DIR
)/hostapd \
92 $(PKG_BUILD_DIR
)/src \
93 $(PKG_BUILD_DIR
)/hostapd.
$(1)/
94 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
97 define Build
/CompileTarget
98 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl $(TARGET_CPPFLAGS)" \
99 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd \
100 $(TARGET_CONFIGURE_OPTS
) \
102 LIBS
="$(TARGET_LDFLAGS) \
103 $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm $(STAGING_DIR)/usr/lib/libnl.a) \
104 $(if $(findstring default,$(1)),-lssl -lcrypto)" \
106 $(CP
) $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/hostapd_cli
$(PKG_BUILD_DIR
)/
109 define Package
/InstallTemplate
110 $(INSTALL_DIR
) $$(1)/lib
/wifi
111 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
112 $(INSTALL_DIR
) $$(1)/usr
/sbin
113 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd.
$(2)/hostapd
/hostapd
$$(1)/usr
/sbin
/
114 # config is managed through uci
115 # $(INSTALL_DIR) $$(1)/etc
116 # $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf
119 define Package
/Template
120 ifneq ($(CONFIG_PACKAGE_
$(1)),)
121 define Build
/Configure
/$(2)
122 $(call Build
/ConfigureTarget
,$(2))
124 define Build
/Compile
/$(2)
125 $(call Build
/CompileTarget
,$(2))
127 define Package
/$(1)/install
128 $(call Package
/InstallTemplate
,$(1),$(2))
133 define Build
/Configure
134 rm -f
$(PKG_BUILD_DIR
)/.configured
*
135 $(call Build
/Configure
/default
)
136 $(call Build
/Configure
/mini
)
140 $(call Build
/Compile
/default
)
141 $(call Build
/Compile
/mini
)
145 rm -rf
$(PKG_BUILD_DIR
)_default
146 rm -rf
$(PKG_BUILD_DIR
)_mini
149 define Package
/hostapd-utils
/install
150 $(INSTALL_DIR
) $(1)/usr
/sbin
151 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
154 $(eval
$(call Package
/Template
,hostapd
,default
))
155 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
157 $(eval
$(call BuildPackage
,hostapd
))
158 $(eval
$(call BuildPackage
,hostapd-mini
))
159 $(eval
$(call BuildPackage
,hostapd-utils
))