2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
/
17 PKG_MD5SUM
:=40416b48cae9c78e5a2452caf214aff3
21 ifeq ($(shell grep
"CONFIG_PACKAGE_kmod-madwifi is not set" $(TOPDIR
)/.config
),)
22 PKG_BUILD_DEPENDS
+=madwifi
24 ifeq ($(shell grep
"CONFIG_PACKAGE_kmod-mac80211 is not set" $(TOPDIR
)/.config
),)
25 PKG_BUILD_DEPENDS
+=mac80211
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/hostapd
/Default
33 TITLE
:=IEEE
802.1x Authenticator
34 URL
:=http
://hostap.epitest.fi
/
37 define Package
/hostapd
38 $(call Package
/hostapd
/Default
)
39 DEPENDS
:=+libopenssl @
!TARGET_AVR32 @
!TARGET_ETRAX
42 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
\\\
46 define Package
/hostapd
/conffiles
50 define Package
/hostapd-mini
51 $(call Package
/hostapd
/Default
)
52 DEPENDS
:=@
!TARGET_AVR32 @
!TARGET_ETRAX
53 TITLE
+= (WPA-PSK only
)
55 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
\\\
59 define Package
/hostapd-mini
/conffiles
63 define Package
/hostapd-utils
64 $(call Package
/hostapd
/Default
)
65 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
68 This package contains a command line utility to control the
\\\
69 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
72 define Build
/ConfigureTarget
73 $(CP
) $(PKG_BUILD_DIR
) $(PKG_BUILD_DIR
)_
$(1)
74 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)_
$(1)/.config
75 ifneq ($(CONFIG_PACKAGE_kmod-madwifi
),)
76 echo
"CONFIG_DRIVER_MADWIFI=y" >> $(PKG_BUILD_DIR
)_
$(1)/.config
78 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
79 echo
"CONFIG_DRIVER_DEVICESCAPE=y" >> $(PKG_BUILD_DIR
)_
$(1)/.config
83 define Build
/CompileTarget
84 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
85 $(TARGET_CONFIGURE_OPTS
) \
86 OPTFLAGS
="$(TARGET_CFLAGS)" \
87 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211" \
88 LDFLAGS
="$(TARGET_LDFLAGS)" \
90 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
93 define Package
/InstallTemplate
94 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
95 rm -f
$(PKG_BUILD_DIR
)/.built
; \
96 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
98 $(INSTALL_DIR
) $$(1)/lib
/wifi
99 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
100 $(INSTALL_DIR
) $$(1)/etc
101 ifneq ($(CONFIG_PACKAGE_kmod-madwifi
),)
102 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
104 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/hostapd.conf
$$(1)/etc
/hostapd.conf
106 $(INSTALL_DIR
) $$(1)/usr
/sbin
107 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
110 define Package
/Template
111 ifneq ($(CONFIG_PACKAGE_
$(1)),)
112 define Build
/Configure
/$(2)
113 $(call Build
/ConfigureTarget
,$(2))
115 define Build
/Compile
/$(2)
116 $(call Build
/CompileTarget
,$(2))
118 define Package
/$(1)/install
119 $(call Package
/InstallTemplate
,$(1),$(2))
124 define Build
/Configure
125 $(call Build
/Configure
/default
)
126 $(call Build
/Configure
/mini
)
130 $(call Build
/Compile
/default
)
131 $(call Build
/Compile
/mini
)
135 rm -rf
$(PKG_BUILD_DIR
)_default
136 rm -rf
$(PKG_BUILD_DIR
)_mini
139 define Package
/hostapd-utils
/install
140 $(INSTALL_DIR
) $(1)/usr
/sbin
141 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
144 $(eval
$(call Package
/Template
,hostapd
,default
))
145 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
147 $(eval
$(call BuildPackage
,hostapd
))
148 $(eval
$(call BuildPackage
,hostapd-mini
))
149 $(eval
$(call BuildPackage
,hostapd-utils
))