lantiq: Tune the XWAY subtarget cflags
[openwrt/staging/yousong.git] / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=udev
11 PKG_VERSION:=173
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/
16 PKG_MD5SUM:=91a88a359b60bbd074b024883cc0dbde
17
18 include $(INCLUDE_DIR)/package.mk
19
20 PKG_INSTALL=1
21
22 define 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 <geoff@infradead.org>
28 MENU:=1
29 DEPENDS:=+librt
30 endef
31
32 define Package/udev/description
33 udev allows Linux users to have a dynamic /dev directory and it
34 provides the ability to have persistent device names.
35 endef
36
37 define Package/udev/conffiles
38 /etc/udev/udev.conf
39 endef
40
41 define Package/udev/config
42 source "$(SOURCE)/Config.in"
43 endef
44
45 udev-args-$(CONFIG_UDEV_DISABLE_LOGGING) += --disable-logging
46 udev-args-$(CONFIG_UDEV_ENABLE_DEBUG) += --enable-debug
47 udev-args-$(CONFIG_UDEV_EXTRA_edd_id) += --enable-edd
48 udev-args-$(CONFIG_UDEV_EXTRA_floppy) += --enable-floppy
49
50 # TODO: make hwdb and introspection work
51
52 CONFIGURE_ARGS += --prefix=/usr --exec-prefix= --sysconfdir=/etc \
53 --disable-hwdb --disable-keymap --disable-gudev --disable-introspection \
54 --libexecdir=/lib/udev --disable-gtk-doc-html \
55 --sbindir=/sbin $(udev-args-y)
56
57 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_accelerometer) += accelerometer
58 udev-extra-rules-$(CONFIG_UDEV_EXTRA_accelerometer) += 61-accelerometer.rules
59
60 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_ata_id) += ata_id
61
62 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_cdrom_id) += cdrom_id
63 udev-extra-rules-$(CONFIG_UDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
64
65 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_collect) += collect
66
67 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_edd_id) += edd_id
68 udev-extra-rules-$(CONFIG_UDEV_EXTRA_edd_id) += 61-persistent-storage-edd.rules
69
70 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_firmware) += firmware
71 udev-extra-rules-$(CONFIG_UDEV_EXTRA_firmware) += 50-firmware.rules
72
73 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_floppy) += create_floppy_devices
74
75 # TODO: make gudev work
76
77 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_input_id) += input_id
78
79 # TODO: make keymap work
80
81 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_mtd_probe) += mtd_probe
82 udev-extra-rules-$(CONFIG_UDEV_EXTRA_mtd_probe) += 75-probe_mtd.rules
83
84 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_path_id) += path_id
85
86 udev-extra-rules-$(CONFIG_UDEV_EXTRA_qemu) += 42-qemu-usb.rules
87
88 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_rule_generator) += \
89 write_cd_rules write_net_rules
90 udev-extra-lib-data-$(CONFIG_UDEV_EXTRA_rule_generator) += \
91 rule_generator.functions
92 udev-extra-rules-$(CONFIG_UDEV_EXTRA_rule_generator) += \
93 75-cd-aliases-generator.rules 75-persistent-net-generator.rules
94
95 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_scsi_id) += scsi_id
96
97 # TODO: make udev-acl work
98
99 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_usb_id) += usb_id
100
101 udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_v4l_id) += v4l_id
102 udev-extra-rules-$(CONFIG_UDEV_EXTRA_v4l_id) += 60-persistent-v4l.rules
103
104 define Build/InstallDev
105 $(INSTALL_DIR) $(1)/usr/include
106 $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
107 $(INSTALL_DIR) $(1)/usr/share/pkgconfig
108 $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc $(1)/usr/share/pkgconfig
109 $(INSTALL_DIR) $(1)/lib
110 $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
111 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
112 $(CP) $(PKG_INSTALL_DIR)/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
113 endef
114
115 define Package/udev/install
116 $(INSTALL_DIR) $(1)/etc/udev/rules.d
117 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
118
119 $(INSTALL_DIR) $(1)/sbin
120 $(INSTALL_BIN) \
121 $(PKG_INSTALL_DIR)/sbin/udevadm \
122 $(PKG_INSTALL_DIR)/sbin/udevd \
123 $(1)/sbin
124
125 $(INSTALL_DIR) $(1)/lib/udev/rules.d
126 $(INSTALL_DATA) \
127 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
128 $(udev-extra-rules-y)) \
129 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
130 50-udev-default.rules \
131 60-persistent-input.rules \
132 60-persistent-serial.rules \
133 60-persistent-storage.rules \
134 80-drivers.rules \
135 95-udev-late.rules) \
136 $(1)/lib/udev/rules.d
137
138 $(INSTALL_DIR) $(1)/lib
139 $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
140
141 $(INSTALL_DIR) $(1)/lib/udev
142 ifneq ($(udev-extra-lib-bin-y),)
143 $(INSTALL_BIN) \
144 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
145 $(udev-extra-lib-bin-y)) \
146 $(1)/lib/udev/
147 endif
148 ifneq ($(udev-extra-lib-data-y),)
149 $(INSTALL_DATA) \
150 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
151 $(udev-extra-lib-data-y)) \
152 $(1)/lib/udev/
153 endif
154 endef
155
156 $(eval $(call BuildPackage,udev))