blob: c378ae3cd298c1e73049896c732ac5843c2679b6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "/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 = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux"
16RPROVIDES_${PN} = "hotplug"
17
Patrick Williamsf1e5d692016-03-30 15:21:19 -050018PROVIDES = "libgudev"
19
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
21 file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \
22 file://avoid-mouse-autosuspend.patch \
23 file://run.rules \
24 file://udev.rules \
25 file://devfs-udev.rules \
26 file://links.conf \
27 file://permissions.rules \
28 file://local.rules \
29 file://udev-cache \
30 file://udev-cache.default \
31 file://add-install-ptest.patch \
32 file://fix_rule-syntax-regex-ptest.patch \
33 file://run-ptest \
34 file://init"
35
36inherit autotools pkgconfig update-rc.d ptest
37RDEPENDS_${PN}-ptest += "make perl python"
38
39libexecdir = "${base_libdir}"
40EXTRA_OECONF = "--disable-introspection \
41 --with-rootlibdir=${base_libdir} \
42 --with-pci-ids-path=${datadir}/pci.ids \
43 ac_cv_file__usr_share_pci_ids=no \
44 ac_cv_file__usr_share_hwdata_pci_ids=no \
45 ac_cv_file__usr_share_misc_pci_ids=yes \
46 --sbindir=${base_sbindir} \
47 --libexecdir=${nonarch_base_libdir} \
48 --with-rootlibdir=${base_libdir} \
49 --with-rootprefix= \
50 --without-systemdsystemunitdir \
51 "
52
53PACKAGES =+ "udev-cache"
54PACKAGES =+ "libudev"
55PACKAGES =+ "libgudev"
56
57INITSCRIPT_PACKAGES = "udev udev-cache"
58INITSCRIPT_NAME_udev = "udev"
59INITSCRIPT_PARAMS_udev = "start 04 S ."
60INITSCRIPT_NAME_udev-cache = "udev-cache"
61INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
62
63FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev ${bindir}/udevadm"
64RRECOMMENDS_${PN} += "udev-cache"
65
66# udev-utils has been removed as a package. Note that udev conflicts with udev-utils so that
67# udev-utils is removed from systems on upgrade.
68RCONFLICTS_${PN} += "udev-utils"
69RREPLACES_${PN} += "udev-utils"
70
71FILES_${PN}-dbg += "${libexecdir}/.debug"
72FILES_${PN}-dbg += "${base_libdir}/udev/.debug/"
73FILES_${PN}-dbg += "${base_libdir}/udev/.debug/*"
74FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*"
75FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
76 ${includedir}/libudev.h ${libdir}/libudev.so ${libdir}/libudev.la \
77 ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc \
78 ${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \
79 ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc"
80FILES_libudev = "${base_libdir}/libudev.so.*"
81FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*"
82FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
83
84do_install_append () {
85 install -d ${D}${sysconfdir}/init.d
86 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
87 install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
88 sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev
89 sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache
90
91 install -d ${D}${sysconfdir}/default
92 install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
93
94 touch ${D}${sysconfdir}/udev/cache.data
95
96 install -d ${D}${sysconfdir}/udev/rules.d/
97
98 install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
99
100 # hid2hci has moved to bluez4. removed in udev as of version 169
101 rm -f ${D}${base_libdir}/udev/hid2hci
102
103 echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf
104}
105
106# As systemd also builds udev, skip this package if we're doing a systemd build.
107python () {
108 if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
109 raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
110}
111do_compile_ptest() {
112 oe_runmake test-udev
113}