diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2017-02-20 21:04:26 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-23 12:29:18 -0800 |
commit | 4b9f483c5164c3aad831580a43bbf3ee6a13eb8c (patch) | |
tree | f849c97ea05d9db236d601cfcc55d4a460e19abf /meta/recipes-core/udev/eudev_3.2.1.bb | |
parent | b3f8fa406fe7bf865379d9a3d26c8c19b58d1cff (diff) | |
download | openembedded-core-4b9f483c5164c3aad831580a43bbf3ee6a13eb8c.tar.gz openembedded-core-4b9f483c5164c3aad831580a43bbf3ee6a13eb8c.tar.bz2 openembedded-core-4b9f483c5164c3aad831580a43bbf3ee6a13eb8c.zip |
eudev: Upgrade to 3.2.1
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/udev/eudev_3.2.1.bb')
-rw-r--r-- | meta/recipes-core/udev/eudev_3.2.1.bb | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/eudev_3.2.1.bb b/meta/recipes-core/udev/eudev_3.2.1.bb new file mode 100644 index 0000000000..9274849dfc --- /dev/null +++ b/meta/recipes-core/udev/eudev_3.2.1.bb @@ -0,0 +1,103 @@ +SUMMARY = "eudev is a fork of systemd's udev" +HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev" +LICENSE = "GPLv2.0+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux" + +PROVIDES = "udev" + +SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ + file://devfs-udev.rules \ + file://init \ + file://links.conf \ + file://local.rules \ + file://permissions.rules \ + file://run.rules \ + file://udev-cache \ + file://udev-cache.default \ + file://udev.rules \ +" +UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases" + +SRC_URI[md5sum] = "a2aae16bc432eac0e71c1267c384e295" +SRC_URI[sha256sum] = "88f530c1540750e6daa91b5eaeebf88e761e6f0c86515c1c28eedfd871f027c6" + +inherit autotools update-rc.d qemu pkgconfig + +EXTRA_OECONF = " \ + --sbindir=${base_sbindir} \ + --with-rootlibdir=${base_libdir} \ + --with-rootprefix= \ +" + +PACKAGECONFIG ??= "hwdb" +PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev + install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache + sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev + sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache + + install -d ${D}${sysconfdir}/default + install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache + + touch ${D}${sysconfdir}/udev/cache.data + + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules + + # Use classic network interface naming scheme + touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules + + # hid2hci has moved to bluez4. removed in udev as of version 169 + rm -f ${D}${base_libdir}/udev/hid2hci +} + +INITSCRIPT_PACKAGES = "eudev udev-cache" +INITSCRIPT_NAME_eudev = "udev" +INITSCRIPT_PARAMS_eudev = "start 04 S ." +INITSCRIPT_NAME_udev-cache = "udev-cache" +INITSCRIPT_PARAMS_udev-cache = "start 36 S ." + +PACKAGES =+ "libudev" +PACKAGES =+ "udev-cache" +PACKAGES =+ "eudev-hwdb" + + +FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm" +FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ + ${includedir}/libudev.h ${libdir}/libudev.so \ + ${includedir}/udev.h ${libdir}/libudev.la \ + ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc" +FILES_libudev = "${base_libdir}/libudev.so.*" +FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" +FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d" + +RDEPENDS_eudev-hwdb += "eudev" + +RRECOMMENDS_${PN} += "udev-cache" + +RPROVIDES_${PN} = "hotplug udev" +RPROVIDES_eudev-hwdb += "udev-hwdb" + +python () { + if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): + raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") +} + +PACKAGE_WRITE_DEPS += "qemu-native" +pkg_postinst_eudev-hwdb () { + if test -n "$D"; then + ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D + chown root:root $D${sysconfdir}/udev/hwdb.bin + else + udevadm hwdb --update + fi +} + +pkg_prerm_eudev-hwdb () { + rm -f $D${sysconfdir}/udev/hwdb.bin +} |