add a default for PKG_BUILD_DIR and PKG_INSTALL_DIR (will use KERNEL_BUILD_DIR if...
[openwrt/staging/chunkeey.git] / package / udev / 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:=udev
12 PKG_VERSION:=106
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \
17 http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \
18 ftp://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \
19 http://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \
20 ftp://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ \
21 http://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/
22 PKG_MD5SUM:=320ccd2d0f4540d10e021bafa14f8985
23 PKG_CAT:=bzcat
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/udev
28 SECTION:=utils
29 CATEGORY:=Utilities
30 DEPENDS:=@LINUX_2_6
31 TITLE:=Dynamic device management subsystem
32 DESCRIPTION:=\
33 udev provides a dynamic device directory containing only the files for \\\
34 actually present devices. It creates or removes device node files in \\\
35 the /dev directory, or it renames network interfaces.
36 URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
37 endef
38
39 define Package/udevtrigger
40 $(call Package/udev)
41 TITLE:=Small utility to request kernel devices events for coldplug
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 CROSS_COMPILE="$(TARGET_CROSS)" \
47 STRIP="/bin/true" \
48 OPTFLAGS="$(TARGET_CFLAGS)" \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 INSTALL="install -c" \
51 all install
52 endef
53
54 define Package/udev/install
55 install -d -m0775 $(1)/etc/udev
56 $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/
57 install -d -m0775 $(1)/lib/udev
58 install -d -m0775 $(1)/sbin/
59 $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
60 $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
61 install -d -m0775 $(1)/usr/bin/
62 $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
63 $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
64 install -d -m0775 $(1)/usr/sbin/
65 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/
66 endef
67
68 define Package/udevtrigger/install
69 $(INSTALL_DIR) $(1)/sbin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevtrigger $(1)/sbin/
71 endef
72
73 $(eval $(call BuildPackage,udev))
74 $(eval $(call BuildPackage,udevtrigger))