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