fix ipsec-tools (missing include, missing dependencies)
[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.3
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=4e3134e8b0d86e831230f8c620fd81bb
15 PKG_BUILDDEP:=madwifi
16
17 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/hostapd
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libopenssl
29 TITLE:=IEEE 802.1x Authenticator
30 DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator
31 URL:=http://hostap.epitest.fi/
32 endef
33
34 define Package/hostapd/conffiles
35 /etc/hostapd.conf
36 endef
37
38 define Package/hostapd-mini
39 $(call Package/hostapd)
40 TITLE:=IEEE 802.1x Authenticator (WPA-PSK only)
41 DEPENDS:=
42 DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (WPA-PSK only)
43 endef
44
45 define Package/hostapd-mini/conffiles
46 /etc/hostapd.conf
47 endef
48
49 define Package/hostapd-utils
50 $(call Package/hostapd)
51 DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
52 TITLE:=IEEE 802.1x Authenticator (utils)
53 DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (command line utils)
54 endef
55
56 define Build/ConfigureTarget
57 $(CP) $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)_$(1)
58 $(CP) ./files/$(1).config $(PKG_BUILD_DIR)_$(1)/.config
59 endef
60
61 define Build/CompileTarget
62 $(MAKE) -C $(PKG_BUILD_DIR)_$(1) \
63 $(TARGET_CONFIGURE_OPTS) \
64 OPTFLAGS="$(TARGET_CFLAGS)" \
65 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
66 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
67 hostapd hostapd_cli
68 $(CP) $(PKG_BUILD_DIR)_$(1)/hostapd_cli $(PKG_BUILD_DIR)/
69 endef
70
71 define Package/InstallTemplate
72 if [ \! -f "$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
73 rm -f $(PKG_BUILD_DIR)/.built; \
74 $(MAKE) $(PKG_BUILD_DIR)/.built; \
75 fi
76 install -m0755 -d $$(1)/etc
77 install -m0600 $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf
78 install -m0755 -d $$(1)/usr/sbin
79 install -m0755 $(PKG_BUILD_DIR)_$(2)/hostapd $$(1)/usr/sbin/
80 endef
81
82 define Package/Template
83 ifneq ($(CONFIG_PACKAGE_$(1)),)
84 define Build/Configure/$(2)
85 $(call Build/ConfigureTarget,$(2))
86 endef
87 define Build/Compile/$(2)
88 $(call Build/CompileTarget,$(2))
89 endef
90 endif
91
92 define Package/$(1)/install
93 $(call Package/InstallTemplate,$(1),$(2))
94 endef
95 endef
96
97 define Build/Configure
98 $(call Build/Configure/default)
99 $(call Build/Configure/mini)
100 endef
101
102 define Build/Compile
103 $(call Build/Compile/default)
104 $(call Build/Compile/mini)
105 endef
106
107 define Build/Clean
108 rm -rf $(PKG_BUILD_DIR)_default
109 rm -rf $(PKG_BUILD_DIR)_mini
110 endef
111
112 define Package/hostapd-utils/install
113 install -m0755 -d $(1)/usr/sbin
114 install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(1)/usr/sbin/
115 endef
116
117 $(eval $(call Package/Template,hostapd,default))
118 $(eval $(call Package/Template,hostapd-mini,mini))
119
120 $(eval $(call BuildPackage,hostapd))
121 $(eval $(call BuildPackage,hostapd-mini))
122 $(eval $(call BuildPackage,hostapd-utils))
This page took 0.061159 seconds and 5 git commands to generate.