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
:=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
79 define Build
/CompileTarget
80 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
81 $(TARGET_CONFIGURE_OPTS
) \
82 OPTFLAGS
="$(TARGET_CFLAGS)" \
83 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/madwifi" \
84 LDFLAGS
="$(TARGET_LDFLAGS)" \
86 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
89 define Package
/InstallTemplate
90 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
91 rm -f
$(PKG_BUILD_DIR
)/.built
; \
92 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
94 $(INSTALL_DIR
) $$(1)/lib
/wifi
95 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
96 $(INSTALL_DIR
) $$(1)/etc
97 ifneq ($(CONFIG_PACKAGE_kmod-madwifi
),)
98 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
100 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/hostapd.conf
$$(1)/etc
/hostapd.conf
102 $(INSTALL_DIR
) $$(1)/usr
/sbin
103 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
106 define Package
/Template
107 ifneq ($(CONFIG_PACKAGE_
$(1)),)
108 define Build
/Configure
/$(2)
109 $(call Build
/ConfigureTarget
,$(2))
111 define Build
/Compile
/$(2)
112 $(call Build
/CompileTarget
,$(2))
114 define Package
/$(1)/install
115 $(call Package
/InstallTemplate
,$(1),$(2))
120 define Build
/Configure
121 $(call Build
/Configure
/default
)
122 $(call Build
/Configure
/mini
)
126 $(call Build
/Compile
/default
)
127 $(call Build
/Compile
/mini
)
131 rm -rf
$(PKG_BUILD_DIR
)_default
132 rm -rf
$(PKG_BUILD_DIR
)_mini
135 define Package
/hostapd-utils
/install
136 $(INSTALL_DIR
) $(1)/usr
/sbin
137 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
140 $(eval
$(call Package
/Template
,hostapd
,default
))
141 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
143 $(eval
$(call BuildPackage
,hostapd
))
144 $(eval
$(call BuildPackage
,hostapd-mini
))
145 $(eval
$(call BuildPackage
,hostapd-utils
))