summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/udev/udev.inc')
-rw-r--r--meta/recipes-core/udev/udev.inc107
1 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
new file mode 100644
index 0000000..1b22525
--- /dev/null
+++ b/meta/recipes-core/udev/udev.inc
@@ -0,0 +1,107 @@
1SUMMARY = "/dev/ and hotplug management daemon"
2DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
3/dev/, handles hotplug events and loads drivers at boot time."
4HOMEPAGE = "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html"
5LICENSE = "GPLv2.0+ & LGPLv2.1+"
6LICENSE_${PN} = "GPLv2.0+"
7LICENSE_libudev = "LGPLv2.1+"
8LICENSE_libgudev = "LGPLv2.1+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \
11 file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266"
12
13LDFLAGS += "-lrt"
14
15DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux"
16RPROVIDES_${PN} = "hotplug"
17
18SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
19 file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \
20 file://avoid-mouse-autosuspend.patch \
21 file://run.rules \
22 file://udev.rules \
23 file://devfs-udev.rules \
24 file://links.conf \
25 file://permissions.rules \
26 file://local.rules \
27 file://udev-cache \
28 file://udev-cache.default \
29 file://add-install-ptest.patch \
30 file://run-ptest \
31 file://init"
32
33inherit autotools pkgconfig update-rc.d ptest
34RDEPENDS_${PN}-ptest += "make"
35
36libexecdir = "${base_libdir}"
37EXTRA_OECONF = "--disable-introspection \
38 --with-rootlibdir=${base_libdir} \
39 --with-pci-ids-path=${datadir}/pci.ids \
40 ac_cv_file__usr_share_pci_ids=no \
41 ac_cv_file__usr_share_hwdata_pci_ids=no \
42 ac_cv_file__usr_share_misc_pci_ids=yes \
43 --sbindir=${base_sbindir} \
44 --libexecdir=${nonarch_base_libdir} \
45 --with-rootlibdir=${base_libdir} \
46 --with-rootprefix= \
47 --without-systemdsystemunitdir \
48 "
49
50PACKAGES =+ "udev-utils udev-cache"
51PACKAGES =+ "libudev"
52PACKAGES =+ "libgudev"
53
54INITSCRIPT_PACKAGES = "udev udev-cache"
55INITSCRIPT_NAME_udev = "udev"
56INITSCRIPT_PARAMS_udev = "start 04 S ."
57INITSCRIPT_NAME_udev-cache = "udev-cache"
58INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
59
60FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev"
61RRECOMMENDS_${PN} += "udev-utils udev-cache"
62
63FILES_${PN}-dbg += "${libexecdir}/.debug"
64FILES_${PN}-dbg += "${base_libdir}/udev/.debug/"
65FILES_${PN}-dbg += "${base_libdir}/udev/.debug/*"
66FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*"
67FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
68 ${includedir}/libudev.h ${libdir}/libudev.so ${libdir}/libudev.la \
69 ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc \
70 ${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \
71 ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc"
72FILES_libudev = "${base_libdir}/libudev.so.*"
73FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*"
74FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
75
76FILES_udev-utils = "${bindir}/udevadm"
77
78do_install_append () {
79 install -d ${D}${sysconfdir}/init.d
80 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
81 install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
82 sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev
83 sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache
84
85 install -d ${D}${sysconfdir}/default
86 install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
87
88 touch ${D}${sysconfdir}/udev/cache.data
89
90 install -d ${D}${sysconfdir}/udev/rules.d/
91
92 install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
93
94 # hid2hci has moved to bluez4. removed in udev as of version 169
95 rm -f ${D}${base_libdir}/udev/hid2hci
96
97 echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf
98}
99
100# As systemd also builds udev, skip this package if we're doing a systemd build.
101python () {
102 if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
103 raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
104}
105do_compile_ptest() {
106 oe_runmake test-udev
107}