move package description to a separate definition, remove it when DESCRIPTION=TITLE
[openwrt/svn-archive/archive.git] / package / zd1211-driver / 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: Makefile 6582 2007-03-16 20:21:39Z nbd $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=zd1211-driver
13 PKG_VERSION:=r85
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
17 PKG_SOURCE_URL:=@openwrt/
18 PKG_MD5SUM:=885cf08742c95cc416258257b5842b22
19
20 include $(INCLUDE_DIR)/package.mk
21
22 #FIXME: add proper dependency handling on kmod-usb-core packages
23 define KernelPackage/zd1211
24 SUBMENU:=Wireless Drivers
25 DEPENDS:=@LINUX_2_6 @USB_SUPPORT
26 TITLE:=Driver for Zydas 1211 based USB devices
27 FILES:=$(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX)
28 AUTOLOAD:=$(call AutoLoad,60,zd1211)
29 endef
30
31 define KernelPackage/zd1211/description
32 This package contains a Linux driver for the ZyDAS ZD1211 802.11b/g
33 USB-WLAN-Chip.
34 Initially contributed by ZyDAS, this driver is actively maintained by the
35 open source community.
36 endef
37
38 define Package/zd1211-utils
39 SECTION:=utils
40 CATEGORY:=Utilities
41 TITLE:=zd1211 user-space utilities
42 endef
43
44 define Package/zd1211-utils/description
45 zd1211 user-space utilities :
46 - apdbg
47 - zd1211-sta
48 endef
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 ARCH="$(LINUX_KARCH)" \
53 CROSS_COMPILE="$(TARGET_CROSS)" \
54 CC="$(TARGET_CC)" \
55 CPP="$(TARGET_CC)" \
56 LD="$(TARGET_CROSS)ld" \
57 KERNELVERSION="$(KERNEL)" \
58 KERNEL_SOURCE="$(LINUX_DIR)" \
59 KDIR="$(LINUX_DIR)" \
60 all
61 $(TARGET_CC) $(PKG_BUILD_DIR)/apdbg.c -o $(PKG_BUILD_DIR)/apdbg
62 endef
63
64 define Package/zd1211-utils/install
65 $(INSTALL_DIR) $(1)/usr/sbin
66 $(CP) $(PKG_BUILD_DIR)/apdbg $(1)/usr/sbin/
67 $(CP) $(PKG_BUILD_DIR)/sta $(1)/usr/sbin/$(PKG_NAME)-sta
68 endef
69
70 $(eval $(call Package,zd1211-utils))
71 $(eval $(call KernelPackage,zd1211))