fix packaging of hostap drivers
[openwrt.git] / package / hostap / 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 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=hostap-driver
13 PKG_VERSION:=0.4.9
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
18 PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25 ifeq ($(DUMP),)
26 -include $(LINUX_DIR)/.config
27 endif
28
29 define KernelPackage/hostap/Default/2.4
30 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
31 endef
32 define KernelPackage/hostap/Default/2.6
33 VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
34 endef
35 define KernelPackage/hostap/Default
36 SUBMENU:=Wireless Drivers
37 DESCRIPTION:=\
38 Host AP is a driver for 802.11b wireless cards based on Intersil \\\
39 Prism2/2.5/3 chipset. It supports so called Host AP mode that allows the \\\
40 card to act as an IEEE 802.11 access point.
41 URL:=http://hostap.epitest.fi/
42 $(call KernelPackage/hostap/Default/$(KERNEL))
43 endef
44
45
46 define KernelPackage/hostap
47 $(call KernelPackage/hostap/Default)
48 DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT
49 TITLE:=Host AP support for Prism2/2.5/3
50 DESCRIPTION+=\\\
51 \\\
52 This package contains the base Host AP driver code that is shared by \\\
53 different hardware models. You will also need to enable support for \\\
54 PLX/PCI/CS version of the driver to actually use the driver.
55 endef
56 define KernelPackage/hostap/2.4
57 FILES:= \
58 $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
59 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
60 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
61 $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX)
62 endef
63 define KernelPackage/hostap/2.6
64 KCONFIG:=$(CONFIG_HOSTAP)
65 FILES:= \
66 $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
67 endef
68
69
70 define KernelPackage/hostap-pci
71 $(call KernelPackage/hostap/Default)
72 DEPENDS:=kmod-hostap
73 TITLE:=Host AP driver for PCI adaptors
74 DESCRIPTION+=\\\
75 \\\
76 This package contains the Host AP driver for Prism2.5 PCI adaptors.
77 endef
78 define KernelPackage/hostap-pci/2.4
79 FILES:= \
80 $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX)
81 endef
82 define KernelPackage/hostap-pci/2.6
83 KCONFIG:=$(CONFIG_HOSTAP_PCI)
84 FILES:= \
85 $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
86 endef
87
88
89 define KernelPackage/hostap-plx
90 $(call KernelPackage/hostap/Default)
91 DEPENDS:=kmod-hostap
92 TITLE:=Host AP driver for PLX9052 based PCI adaptors
93 DESCRIPTION+=\\\
94 \\\
95 This package contains the Host AP driver for Prism2/2.5/3 in PLX9052 \\\
96 based PCI adaptors.
97 endef
98 define KernelPackage/hostap-plx/2.4
99 FILES:= \
100 $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX)
101 endef
102 define KernelPackage/hostap-plx/2.6
103 KCONFIG:=$(CONFIG_HOSTAP_PLX)
104 FILES:= \
105 $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
106 endef
107
108
109 ifeq ($(KERNEL),2.4)
110 define Build/Compile
111 $(MAKE) -C $(LINUX_DIR)/ \
112 ARCH="$(LINUX_KARCH)" \
113 CROSS_COMPILE="$(TARGET_CROSS)" \
114 SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
115 modules
116 endef
117
118 define Package/kmod-hostap-pci/install
119 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
120 $(CP) \
121 $(1)/lib/modules/$(LINUX_VERSION)/
122 endef
123
124 define Package/kmod-hostap-plx/install
125 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
126 $(CP) \
127 $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \
128 $(1)/lib/modules/$(LINUX_VERSION)/
129 endef
130 else
131 define Build/Prepare
132 mkdir -p $(PKG_BUILD_DIR)
133 endef
134
135 define Build/Configure
136 endef
137
138 define Build/Compile
139 endef
140 endif
141
142
143 $(eval $(call KernelPackage,hostap))
144 $(eval $(call KernelPackage,hostap-pci))
145 $(eval $(call KernelPackage,hostap-plx))
This page took 0.049005 seconds and 5 git commands to generate.