Really add the LED driver :)
[openwrt.git] / package / hostapd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=hostapd
12 PKG_VERSION:=0.5.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
17 PKG_MD5SUM:=d5113247dc6ee17106e6bc7cb89aa507
18
19 PKG_BUILD_DEPENDS:=madwifi
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/hostapd/Default
24 SECTION:=net
25 CATEGORY:=Network
26 TITLE:=IEEE 802.1x Authenticator
27 URL:=http://hostap.epitest.fi/
28 endef
29
30 define Package/hostapd
31 $(call Package/hostapd/Default)
32 DEPENDS:=+libopenssl @!LINUX_2_6_AVR32
33 TITLE+= (full)
34 DESCRIPTION:=\
35 This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS \\\
36 Authenticator.
37 endef
38
39 define Package/hostapd/conffiles
40 /etc/hostapd.conf
41 endef
42
43 define Package/hostapd-mini
44 $(call Package/hostapd/Default)
45 DEPENDS:=@!LINUX_2_6_AVR32
46 TITLE+= (WPA-PSK only)
47 DESCRIPTION:=\
48 This package contains a minimal IEEE 802.1x/WPA/EAP/RADIUS Authenticator \\\
49 (WPA-PSK only).
50 endef
51
52 define Package/hostapd-mini/conffiles
53 /etc/hostapd.conf
54 endef
55
56 define Package/hostapd-utils
57 $(call Package/hostapd/Default)
58 DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
59 TITLE+= (utils)
60 DESCRIPTION:=\
61 This package contains a command line utility to control the \\\
62 IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
63 endef
64
65 define Build/ConfigureTarget
66 $(CP) $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)_$(1)
67 $(CP) ./files/$(1).config $(PKG_BUILD_DIR)_$(1)/.config
68 endef
69
70 define Build/CompileTarget
71 $(MAKE) -C $(PKG_BUILD_DIR)_$(1) \
72 $(TARGET_CONFIGURE_OPTS) \
73 OPTFLAGS="$(TARGET_CFLAGS)" \
74 CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/madwifi" \
75 LDFLAGS="$(TARGET_LDFLAGS)" \
76 hostapd hostapd_cli
77 $(CP) $(PKG_BUILD_DIR)_$(1)/hostapd_cli $(PKG_BUILD_DIR)/
78 endef
79
80 define Package/InstallTemplate
81 if [ \! -f "$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
82 rm -f $(PKG_BUILD_DIR)/.built; \
83 $(MAKE) $(PKG_BUILD_DIR)/.built; \
84 fi
85 $(INSTALL_DIR) $$(1)/lib/wifi
86 $(INSTALL_DATA) ./files/hostapd.sh $$(1)/lib/wifi/hostapd.sh
87 $(INSTALL_DIR) $$(1)/etc
88 $(INSTALL_CONF) $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf
89 $(INSTALL_DIR) $$(1)/usr/sbin
90 $(INSTALL_BIN) $(PKG_BUILD_DIR)_$(2)/hostapd $$(1)/usr/sbin/
91 endef
92
93 define Package/Template
94 ifneq ($(CONFIG_PACKAGE_$(1)),)
95 define Build/Configure/$(2)
96 $(call Build/ConfigureTarget,$(2))
97 endef
98 define Build/Compile/$(2)
99 $(call Build/CompileTarget,$(2))
100 endef
101 define Package/$(1)/install
102 $(call Package/InstallTemplate,$(1),$(2))
103 endef
104 endif
105 endef
106
107 define Build/Configure
108 $(call Build/Configure/default)
109 $(call Build/Configure/mini)
110 endef
111
112 define Build/Compile
113 $(call Build/Compile/default)
114 $(call Build/Compile/mini)
115 endef
116
117 define Build/Clean
118 rm -rf $(PKG_BUILD_DIR)_default
119 rm -rf $(PKG_BUILD_DIR)_mini
120 endef
121
122 define Package/hostapd-utils/install
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd_cli $(1)/usr/sbin/
125 endef
126
127 $(eval $(call Package/Template,hostapd,default))
128 $(eval $(call Package/Template,hostapd-mini,mini))
129
130 $(eval $(call BuildPackage,hostapd))
131 $(eval $(call BuildPackage,hostapd-mini))
132 $(eval $(call BuildPackage,hostapd-utils))
This page took 0.055448 seconds and 5 git commands to generate.