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