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
19 PKG_BUILD_DEPENDS
:= mac80211 madwifi
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/hostapd
/Default
26 TITLE
:=IEEE
802.1x Authenticator
27 URL
:=http
://hostap.epitest.fi
/
28 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
31 define Package
/hostapd
32 $(call Package
/hostapd
/Default
)
37 define Package
/hostapd
/conffiles
41 define Package
/hostapd
/description
42 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
46 define Package
/hostapd-mini
47 $(call Package
/hostapd
/Default
)
48 TITLE
+= (WPA-PSK only
)
51 define Package
/hostapd-mini
/conffiles
55 define Package
/hostapd-mini
/description
56 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
60 define Package
/hostapd-utils
61 $(call Package
/hostapd
/Default
)
63 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
66 define Package
/hostapd-utils
/description
67 This package contains a command line utility to control the
68 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
71 define Build
/ConfigureTarget
72 $(CP
) $(PKG_BUILD_DIR
) $(PKG_BUILD_DIR
)_
$(1)
73 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)_
$(1)/.config
74 ifneq ($(CONFIG_PACKAGE_kmod-madwifi
),)
75 echo
"CONFIG_DRIVER_MADWIFI=y" >> $(PKG_BUILD_DIR
)_
$(1)/.config
77 ifneq ($(CONFIG_PACKAGE_kmod-mac80211
),)
78 echo
"CONFIG_DRIVER_DEVICESCAPE=y" >> $(PKG_BUILD_DIR
)_
$(1)/.config
82 define Build
/CompileTarget
83 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
84 $(TARGET_CONFIGURE_OPTS
) \
85 OPTFLAGS
="$(TARGET_CFLAGS)" \
86 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211" \
87 LDFLAGS
="$(TARGET_LDFLAGS)" \
89 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
92 define Package
/InstallTemplate
93 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
94 rm -f
$(PKG_BUILD_DIR
)/.built
; \
95 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
97 $(INSTALL_DIR
) $$(1)/lib
/wifi
98 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
99 $(INSTALL_DIR
) $$(1)/etc
100 ifneq ($(CONFIG_PACKAGE_kmod-madwifi
),)
101 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
103 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/hostapd.conf
$$(1)/etc
/hostapd.conf
105 $(INSTALL_DIR
) $$(1)/usr
/sbin
106 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
109 define Package
/Template
110 ifneq ($(CONFIG_PACKAGE_
$(1)),)
111 define Build
/Configure
/$(2)
112 $(call Build
/ConfigureTarget
,$(2))
114 define Build
/Compile
/$(2)
115 $(call Build
/CompileTarget
,$(2))
117 define Package
/$(1)/install
118 $(call Package
/InstallTemplate
,$(1),$(2))
123 define Build
/Configure
124 $(call Build
/Configure
/default
)
125 $(call Build
/Configure
/mini
)
129 $(call Build
/Compile
/default
)
130 $(call Build
/Compile
/mini
)
134 rm -rf
$(PKG_BUILD_DIR
)_default
135 rm -rf
$(PKG_BUILD_DIR
)_mini
138 define Package
/hostapd-utils
/install
139 $(INSTALL_DIR
) $(1)/usr
/sbin
140 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
143 $(eval
$(call Package
/Template
,hostapd
,default
))
144 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
146 $(eval
$(call BuildPackage
,hostapd
))
147 $(eval
$(call BuildPackage
,hostapd-mini
))
148 $(eval
$(call BuildPackage
,hostapd-utils
))