Bumped udev_151
[openembedded.git] / recipes / 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 = "r25"
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://mtd-exclude-persistent.patch;patch=1 \
15            file://mount.blacklist \
16            "
17
18 require udev.inc
19
20 INITSCRIPT_PARAMS = "start 03 S ."
21
22 FILES_${PN} += "${base_libdir}/udev/*"
23 FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
24 UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/ extras/run_directory/"
25 EXTRA_OEMAKE += "libudevdir=/lib/udev libdir=${base_libdir} prefix="
26
27 do_install () {
28         install -d ${D}${usrsbindir} \
29                    ${D}${sbindir} \
30                    ${D}${sysconfdir}
31         oe_runmake 'DESTDIR=${D}' INSTALL=install install
32         install -d ${D}${sysconfdir}/init.d
33         install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
34
35         install -d ${D}${sysconfdir}/udev/rules.d/
36
37         install -m 0644 ${WORKDIR}/mount.blacklist     ${D}${sysconfdir}/udev/
38         install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
39         install -m 0644 ${WORKDIR}/permissions.rules   ${D}${sysconfdir}/udev/rules.d/permissions.rules
40         install -m 0644 ${WORKDIR}/udev.rules          ${D}${sysconfdir}/udev/rules.d/udev.rules
41         install -m 0644 ${WORKDIR}/links.conf          ${D}${sysconfdir}/udev/links.conf
42         if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
43                 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
44         fi
45
46         install -d ${D}${sysconfdir}/udev/scripts/
47
48         install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
49         install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
50
51         install -d ${D}${base_libdir}/udev/
52         install -m 0755 ${S}/udevsynthesize ${D}${base_libdir}/udev/udevsynthesize
53         install -m 0755 ${WORKDIR}/udevsynthesize.sh ${D}${sbindir}/udevsynthesize
54 }
55
56 pkg_postinst_append() {
57
58         # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter,
59         # causing confusion with fsck on boot
60
61         while read dev mp fs junk
62         do
63                 if test "$mp" = "/"
64                 then
65                         root_partition="$dev"
66                         echo "$root_partition" >> $D${sysconfdir}/udev/mount.blacklist
67                 fi
68         done < $D${sysconfdir}/fstab
69
70 }
71