Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / packages / udev / udev_092.bb
1 DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
2 /dev/, handles hotplug events and loads drivers at boot time. It replaces \
3 the hotplug package and requires a kernel not older than 2.6.12."
4 RPROVIDES_${PN} = "hotplug"
5
6 PR = "r24"
7
8 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
9            file://noasmlinkage.patch;patch=1 \
10            file://flags.patch;patch=1 \
11            file://udevsynthesize.patch;patch=1 \
12            file://udevsynthesize.sh \
13            file://arm_inotify_fix.patch;patch=1 \
14            file://mount.blacklist \
15            "
16
17 require udev.inc
18
19 INITSCRIPT_PARAMS = "start 03 S ."
20
21 FILES_${PN} += "${base_libdir}/udev/*"
22 FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
23 UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/ extras/run_directory/"
24 EXTRA_OEMAKE += "libudevdir=/lib/udev libdir=${base_libdir} prefix="
25
26 do_install () {
27         install -d ${D}${usrsbindir} \
28                    ${D}${sbindir} \
29                    ${D}${sysconfdir}
30         oe_runmake 'DESTDIR=${D}' INSTALL=install install
31         install -d ${D}${sysconfdir}/init.d
32         install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
33
34         install -d ${D}${sysconfdir}/udev/rules.d/
35
36         install -m 0644 ${WORKDIR}/mount.blacklist     ${D}${sysconfdir}/udev/
37         install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
38         install -m 0644 ${WORKDIR}/permissions.rules   ${D}${sysconfdir}/udev/rules.d/permissions.rules
39         install -m 0644 ${WORKDIR}/udev.rules          ${D}${sysconfdir}/udev/rules.d/udev.rules
40         install -m 0644 ${WORKDIR}/links.conf          ${D}${sysconfdir}/udev/links.conf
41         if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
42                 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
43         fi
44
45         install -d ${D}${sysconfdir}/udev/scripts/
46
47         install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
48         install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
49
50         install -d ${D}${base_libdir}/udev/
51         install -m 0755 ${S}/udevsynthesize ${D}${base_libdir}/udev/udevsynthesize
52         install -m 0755 ${WORKDIR}/udevsynthesize.sh ${D}${sbindir}/udevsynthesize
53 }
54
55 pkg_postinst_append() {
56
57         # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter,
58         # causing confusion with fsck on boot
59
60         while read dev mp fs junk
61         do
62                 if test "$mp" = "/"
63                 then
64                         root_partition="$dev"
65                         echo "$root_partition" >> $D${sysconfdir}/udev/mount.blacklist
66                 fi
67         done < $D${sysconfdir}/fstab
68
69 }
70