127880b6bd95693a955701a2f4f59a83adacc915
[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   URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
27 endef
28
29 define Package/udev/description
30  udev provides a dynamic device directory containing only the files for 
31  actually present devices. It creates or removes device node files in 
32  the /dev directory, or it renames network interfaces.
33 endef
34
35 define Package/udevtrigger
36 $(call Package/udev)
37   TITLE:=Small utility to request kernel devices events for coldplug
38 endef
39
40 define Package/udev-vol-id
41 $(call Package/udev)
42  TITLE:=Small utility to read volume ids
43 endef
44
45 define Build/Compile
46         $(MAKE) -C $(PKG_BUILD_DIR) \
47                 CROSS_COMPILE="$(TARGET_CROSS)" \
48                 STRIP="/bin/true" \
49                 OPTFLAGS="$(TARGET_CFLAGS)" \
50                 DESTDIR="$(PKG_INSTALL_DIR)" \
51                 INSTALL="install -c" \
52                 EXTRAS="extras/volume_id" \
53                 all install
54 endef
55
56 define Package/udev/install
57         install -d -m0775 $(1)/etc/udev
58         $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/
59         install -d -m0775 $(1)/lib/udev
60         install -d -m0775 $(1)/sbin/
61         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
62         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
63         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/
64         install -d -m0775 $(1)/usr/bin/
65         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
66         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
67         install -d -m0775 $(1)/usr/sbin/
68         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/
69 endef
70
71 define Package/udevtrigger/install
72         $(INSTALL_DIR) $(1)/sbin
73         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevtrigger $(1)/sbin/
74 endef
75 define Package/udev-vol-id/install
76         $(INSTALL_DIR) $(1)/sbin
77         $(INSTALL_DIR) $(1)/lib
78         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/libvolume_id.so* $(1)/lib/
79         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/udev/vol_id $(1)/sbin/
80 endef
81
82 $(eval $(call BuildPackage,udev))
83 $(eval $(call BuildPackage,udevtrigger))
84 $(eval $(call BuildPackage,udev-vol-id))