increase dvbapp PR
[vuplus_openembedded] / recipes / udev / udev_100.bb
1 DEFAULT_PREFERENCE = "-1"
2 DEFAULT_PREFERENCE_slugos = "1"
3
4 DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
5 /dev/, handles hotplug events and loads drivers at boot time. It replaces \
6 the hotplug package and requires a kernel not older than 2.6.15."
7 DESCRIPTION_libvolume-id = "libvolume_id shared library, \
8 used to detect the type of a file system and read its metadata."
9 DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \
10 needed to link programs with libvolume_id."
11
12 PR = "r16"
13
14 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
15            file://noasmlinkage.patch;patch=1 \
16            file://flags.patch;patch=1 \
17            file://mtd-exclude-persistent.patch;patch=1 \
18            file://mount.blacklist \
19            file://mount.sh \
20            "
21
22 require udev.inc
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                    ${D}${sysconfdir}
35         oe_runmake 'DESTDIR=${D}' INSTALL=install install
36         install -d ${D}${sysconfdir}/init.d
37         install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
38
39         install -d ${D}${sysconfdir}/udev/rules.d/
40
41         install -m 0644 ${WORKDIR}/mount.blacklist     ${D}${sysconfdir}/udev/
42         install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
43         install -m 0644 ${WORKDIR}/permissions.rules   ${D}${sysconfdir}/udev/rules.d/permissions.rules
44         install -m 0644 ${WORKDIR}/udev.rules          ${D}${sysconfdir}/udev/rules.d/udev.rules
45         install -m 0644 ${WORKDIR}/links.conf          ${D}${sysconfdir}/udev/links.conf
46         if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
47                 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
48         fi
49
50         install -d ${D}${sysconfdir}/udev/scripts/
51
52         install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
53         install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
54
55         install -d ${D}${base_libdir}/udev/
56 }
57
58 pkg_postinst_append() {
59
60         # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter,
61         # causing confusion with fsck on boot
62
63         while read dev mp fs junk
64         do
65                 if test "$mp" = "/"
66                 then
67                         root_partition="$dev"
68                         echo "$root_partition" >> $D${sysconfdir}/udev/mount.blacklist
69                 fi
70         done < $D${sysconfdir}/fstab
71
72 }
73