[udev] build fix
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-core / udev / udev_124.inc
1 DESCRIPTION ?= "udev is a program which dynamically creates and removes device nodes from \
2 /dev/. It responds to /sbin/hotplug device events and requires a 2.6 kernel."
3 LICENSE = "GPLv2+"
4 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
5
6 SRC_URI += " \
7            file://udev.rules \
8            file://devfs-udev.rules \
9            file://links.conf \
10            file://permissions.rules \
11            file://mount.sh \
12            file://network.sh \
13            file://local.rules \
14            file://init"
15
16 inherit update-rc.d autotools-brokensep pkgconfig
17
18 PARALLEL_MAKE = ""
19 UDEV_DEVFS_RULES ?= "0"
20 PKG_libvolume-id-dev = "libvolume-id-dev"
21
22 INITSCRIPT_NAME = "udev"
23 INITSCRIPT_PARAMS = "start 04 S ."
24
25 export CROSS = "${TARGET_PREFIX}"
26 export HOSTCC = "${BUILD_CC}"
27 export udevdir ?= "/dev"
28 export usrbindir := "${bindir}"
29 export usrsbindir := "${sbindir}"
30 export etcdir = "${sysconfdir}"
31 LD = "${CC}"
32 bindir = "/bin"
33 sbindir = "/sbin"
34
35 UDEV_EXTRAS = "<override me>"
36 EXTRA_OEMAKE = "-e \
37                 'EXTRAS=${UDEV_EXTRAS}' \
38                 'STRIP=echo'"
39
40 do_install () {
41         install -d ${D}${usrsbindir} \
42                    ${D}${sbindir}
43         oe_runmake 'DESTDIR=${D}' INSTALL=install install
44         install -d ${D}${sysconfdir}/init.d
45         install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
46
47         install -d ${D}${sysconfdir}/udev/rules.d/
48
49         install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
50         install -m 0644 ${WORKDIR}/permissions.rules   ${D}${sysconfdir}/udev/rules.d/permissions.rules
51         install -m 0644 ${WORKDIR}/udev.rules          ${D}${sysconfdir}/udev/rules.d/udev.rules
52         if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
53                 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
54         fi
55
56         install -d ${D}${sysconfdir}/udev/scripts/
57
58         install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
59         install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
60 }
61
62 PACKAGES =+ "udev-utils libvolume-id libvolume-id-dev"
63 FILES_libvolume-id-dev = "${includedir}/libvolume_id.h ${libdir}/libvolume_id.a ${libdir}/libvolume_id.so ${libdir}/pkgconfig/libvolume_id.pc"
64 FILES_udev-utils = "${usrbindir}/udevinfo ${sbindir}/udevadm ${usrbindir}/udevtest"
65 FILES_libvolume-id = "${base_libdir}/libvolume_id.so.*"
66 FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
67 FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"