merge of 425cf1b391611c169a1c3b78f1fe86df088902b9
[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 PR = "r5"
12
13 SRC_URI = "http://kernel.org/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 SRC_URI_append_h2200 = " file://50-hostap_cs.rules "
22 PACKAGE_ARCH_h2200 = "h2200"
23
24 INITSCRIPT_PARAMS = "start 03 S ."
25
26 FILES_${PN} += "${base_libdir}/udev/*"
27 FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
28 UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/ extras/run_directory/"
29 EXTRA_OEMAKE += "libudevdir=/lib/udev libdir=${base_libdir} prefix="
30
31 do_install () {
32         install -d ${D}${usrsbindir} \
33                    ${D}${sbindir}
34         oe_runmake 'DESTDIR=${D}' INSTALL=install install
35         install -d ${D}${sysconfdir}/init.d
36         install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
37
38         install -d ${D}${sysconfdir}/udev/rules.d/
39
40         install -m 0644 ${WORKDIR}/mount.blacklist     ${D}${sysconfdir}/udev/
41         install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
42         install -m 0644 ${WORKDIR}/permissions.rules   ${D}${sysconfdir}/udev/rules.d/permissions.rules
43         install -m 0644 ${WORKDIR}/udev.rules          ${D}${sysconfdir}/udev/rules.d/udev.rules
44         install -m 0644 ${WORKDIR}/links.conf          ${D}${sysconfdir}/udev/links.conf
45         if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
46                 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
47         fi
48
49         install -d ${D}${sysconfdir}/udev/scripts/
50
51         install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
52         install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
53
54         install -d ${D}${base_libdir}/udev/
55 }
56
57 do_install_append_h2200() {
58         install -m 0644 ${WORKDIR}/50-hostap_cs.rules         ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules
59 }
60
61 pkg_postinst_append() {
62         
63         # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter,
64         # causing confusion with fsck on boot
65         
66         while read dev mp fs junk
67         do
68                 if test "$mp" = "/"
69                 then
70                         root_partition="$dev"
71                         echo "$root_partition" >> /etc/udev/mount.blacklist
72                 fi
73         done < /etc/fstab
74         
75 }
76
77