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_SOURCE_SUBDIR
:=hostapd-
$(PKG_VERSION
)
18 PKG_SOURCE_VERSION
:=$(PKG_REV
)
19 PKG_MD5SUM
:=62876f2179f316db0621cc33adf04c19
20 PKG_BUILD_DEPENDS
:=PACKAGE_kmod-madwifi
:madwifi PACKAGE_kmod-mac80211
:mac80211 PACKAGE_kmod-mac80211
:libnl
22 include $(INCLUDE_DIR
)/package.mk
23 STAMP_CONFIGURED
:=$(STAMP_CONFIGURED
)_
$(call confvar
,CONFIG_PACKAGE_kmod-mac80211 CONFIG_PACKAGE_kmod-madwifi CONFIG_PACKAGE_hostapd CONFIG_PACKAGE_hostapd-mini
)
25 define Package
/hostapd
/Default
28 TITLE
:=IEEE
802.1x Authenticator
29 URL
:=http
://hostap.epitest.fi
/
30 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
33 define Package
/hostapd
34 $(call Package
/hostapd
/Default
)
36 DEPENDS
+= +PACKAGE_hostapd
:libopenssl
39 #define Package/hostapd/conffiles
43 define Package
/hostapd
/description
44 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
48 define Package
/hostapd-mini
49 $(call Package
/hostapd
/Default
)
50 TITLE
+= (WPA-PSK only
)
53 #define Package/hostapd-mini/conffiles
57 define Package
/hostapd-mini
/description
58 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
62 define Package
/hostapd-utils
63 $(call Package
/hostapd
/Default
)
65 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
68 define Package
/hostapd-utils
/description
69 This package contains a command line utility to control the
70 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
73 define Build
/ConfigureTarget
74 rm -rf
$(PKG_BUILD_DIR
)/hostapd.
$(1)
75 mkdir
-p
$(PKG_BUILD_DIR
)/hostapd.
$(1)
77 $(PKG_BUILD_DIR
)/hostapd \
78 $(PKG_BUILD_DIR
)/src \
79 $(PKG_BUILD_DIR
)/hostapd.
$(1)/
80 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
81 $(if
$(CONFIG_PACKAGE_kmod-mac80211
),,$(SED
) 's,^CONFIG_DRIVER_NL80211,#CONFIG_DRIVER_NL80211,g' $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
)
82 $(if
$(CONFIG_PACKAGE_kmod-madwifi
),,$(SED
) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
)
85 define Build
/CompileTarget
86 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl -I$(STAGING_DIR)/usr/include" \
87 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd \
88 $(TARGET_CONFIGURE_OPTS
) \
89 LIBS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib \
90 $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm $(STAGING_DIR)/usr/lib/libnl.a) \
91 $(if $(findstring default,$(1)),-lssl -lcrypto)" \
93 $(CP
) $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/hostapd_cli
$(PKG_BUILD_DIR
)/
96 define Package
/InstallTemplate
97 $(INSTALL_DIR
) $$(1)/lib
/wifi
98 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
99 $(INSTALL_DIR
) $$(1)/usr
/sbin
100 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd.
$(2)/hostapd
/hostapd
$$(1)/usr
/sbin
/
101 # config is managed through uci
102 # $(INSTALL_DIR) $$(1)/etc
103 # $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf
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 rm -f
$(PKG_BUILD_DIR
)/.configured
*
122 $(call Build
/Configure
/default
)
123 $(call Build
/Configure
/mini
)
127 $(call Build
/Compile
/default
)
128 $(call Build
/Compile
/mini
)
132 rm -rf
$(PKG_BUILD_DIR
)_default
133 rm -rf
$(PKG_BUILD_DIR
)_mini
136 define Package
/hostapd-utils
/install
137 $(INSTALL_DIR
) $(1)/usr
/sbin
138 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
141 $(eval
$(call Package
/Template
,hostapd
,default
))
142 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
144 $(eval
$(call BuildPackage
,hostapd
))
145 $(eval
$(call BuildPackage
,hostapd-mini
))
146 $(eval
$(call BuildPackage
,hostapd-utils
))