Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "/dev/ and hotplug management daemon" |
| 2 | DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \ |
| 3 | /dev/, handles hotplug events and loads drivers at boot time." |
| 4 | HOMEPAGE = "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html" |
| 5 | LICENSE = "GPLv2.0+ & LGPLv2.1+" |
| 6 | LICENSE_${PN} = "GPLv2.0+" |
| 7 | LICENSE_libudev = "LGPLv2.1+" |
| 8 | LICENSE_libgudev = "LGPLv2.1+" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
| 10 | file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \ |
| 11 | file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266" |
| 12 | |
| 13 | LDFLAGS += "-lrt" |
| 14 | |
| 15 | DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux" |
| 16 | RPROVIDES_${PN} = "hotplug" |
| 17 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 18 | PROVIDES = "libgudev" |
| 19 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | SRC_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 | |
| 36 | inherit autotools pkgconfig update-rc.d ptest |
| 37 | RDEPENDS_${PN}-ptest += "make perl python" |
| 38 | |
| 39 | libexecdir = "${base_libdir}" |
| 40 | EXTRA_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 | |
| 53 | PACKAGES =+ "udev-cache" |
| 54 | PACKAGES =+ "libudev" |
| 55 | PACKAGES =+ "libgudev" |
| 56 | |
| 57 | INITSCRIPT_PACKAGES = "udev udev-cache" |
| 58 | INITSCRIPT_NAME_udev = "udev" |
| 59 | INITSCRIPT_PARAMS_udev = "start 04 S ." |
| 60 | INITSCRIPT_NAME_udev-cache = "udev-cache" |
| 61 | INITSCRIPT_PARAMS_udev-cache = "start 36 S ." |
| 62 | |
| 63 | FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev ${bindir}/udevadm" |
| 64 | RRECOMMENDS_${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. |
| 68 | RCONFLICTS_${PN} += "udev-utils" |
| 69 | RREPLACES_${PN} += "udev-utils" |
| 70 | |
| 71 | FILES_${PN}-dbg += "${libexecdir}/.debug" |
| 72 | FILES_${PN}-dbg += "${base_libdir}/udev/.debug/" |
| 73 | FILES_${PN}-dbg += "${base_libdir}/udev/.debug/*" |
| 74 | FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*" |
| 75 | FILES_${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" |
| 80 | FILES_libudev = "${base_libdir}/libudev.so.*" |
| 81 | FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*" |
| 82 | FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" |
| 83 | |
| 84 | do_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. |
| 107 | python () { |
| 108 | if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): |
| 109 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") |
| 110 | } |
| 111 | do_compile_ptest() { |
| 112 | oe_runmake test-udev |
| 113 | } |