Root/package/udev/Makefile

1#
2# Copyright (C) 2006-2008 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=udev
11PKG_VERSION:=142
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/
16PKG_MD5SUM:=3edc4cf383dccb06d866c5156d59ddd5
17
18include $(INCLUDE_DIR)/package.mk
19
20PKG_INSTALL=1
21
22define Package/udev
23  SECTION:=base
24  CATEGORY:=Base system
25  TITLE:=Dynamic device management subsystem
26  URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
27  MAINTAINER:=Geoff Levand <geoffrey.levand@am.sony.com>
28  MENU:=1
29endef
30
31define Package/udev/description
32    udev allows Linux users to have a dynamic /dev directory and it
33    provides the ability to have persistent device names.
34endef
35
36define Package/udev/conffiles
37/etc/udev/udev.conf
38endef
39
40define Package/udev/config
41    source "$(SOURCE)/Config.in"
42endef
43
44udev-args-$(CONFIG_UDEV_DISABLE_LOGGING) += --disable-logging
45udev-args-$(CONFIG_UDEV_ENABLE_DEBUG) += --enable-debug
46
47CONFIGURE_ARGS += --prefix=/usr --exec-prefix= --sysconfdir=/etc \
48    --sbindir=/sbin $(udev-args-y)
49
50udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_ata_id) += ata_id
51
52udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_cdrom_id) += cdrom_id
53udev-extra-rules-$(CONFIG_UDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
54
55udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_collect) += collect
56
57udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_edd_id) += edd_id
58udev-extra-rules-$(CONFIG_UDEV_EXTRA_edd_id) += 61-persistent-storage-edd.rules
59
60udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_firmware) += firmware.sh
61udev-extra-rules-$(CONFIG_UDEV_EXTRA_firmware) += 50-firmware.rules
62
63udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_floppy) += create_floppy_devices
64
65udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_fstab_import) += fstab_import
66udev-extra-rules-$(CONFIG_UDEV_EXTRA_fstab_import) += 79-fstab_import.rules
67
68udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_path_id) += path_id
69
70udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_rule_generator) += \
71    write_cd_rules write_net_rules
72udev-extra-lib-data-$(CONFIG_UDEV_EXTRA_rule_generator) += \
73    rule_generator.functions
74udev-extra-rules-$(CONFIG_UDEV_EXTRA_rule_generator) += \
75    75-cd-aliases-generator.rules 75-persistent-net-generator.rules
76
77udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_scsi_id) += scsi_id
78
79udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_usb_id) += usb_id
80
81define Build/InstallDev
82    $(INSTALL_DIR) $(1)/usr/include
83    $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
84    $(INSTALL_DIR) $(1)/lib
85    $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
86    $(INSTALL_DIR) $(1)/usr/lib
87    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libudev.so $(1)/usr/lib
88    $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
89    $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
90endef
91
92define Package/udev/install
93    $(INSTALL_DIR) $(1)/etc/udev/rules.d
94    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
95
96    $(INSTALL_DIR) $(1)/sbin
97    $(INSTALL_BIN) \
98        $(PKG_INSTALL_DIR)/sbin/udevadm \
99        $(PKG_INSTALL_DIR)/sbin/udevd \
100        $(1)/sbin
101
102    $(INSTALL_DIR) $(1)/lib/udev/rules.d
103    $(INSTALL_DATA) \
104        $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
105            $(udev-extra-rules-y)) \
106        $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
107            50-udev-default.rules \
108            60-persistent-input.rules \
109            60-persistent-serial.rules \
110            60-persistent-storage.rules \
111            80-drivers.rules \
112            95-udev-late.rules) \
113        $(1)/lib/udev/rules.d
114
115    $(INSTALL_DIR) $(1)/lib
116    $(INSTALL_BIN) \
117        $(PKG_INSTALL_DIR)/lib/libudev.so.* \
118        $(1)/lib
119
120    $(INSTALL_DIR) $(1)/lib/udev
121ifneq ($(udev-extra-lib-bin-y),)
122        $(INSTALL_BIN) \
123            $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
124                $(udev-extra-lib-bin-y)) \
125            $(1)/lib/udev/
126endif
127ifneq ($(udev-extra-lib-data-y),)
128        $(INSTALL_DATA) \
129            $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
130                $(udev-extra-lib-data-y)) \
131            $(1)/lib/udev/
132endif
133endef
134
135$(eval $(call BuildPackage,udev))
136

Archive Download this file



interactive