Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "eudev is a fork of systemd's udev" |
| 2 | HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev" |
| 3 | LICENSE = "GPLv2.0+ & LGPL-2.1+" |
| 4 | LICENSE_libudev = "LGPL-2.1+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 6 | |
| 7 | DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux" |
| 8 | |
| 9 | PROVIDES = "udev" |
| 10 | |
| 11 | SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \ |
| 12 | file://0014-Revert-rules-remove-firmware-loading-rules.patch \ |
| 13 | file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \ |
| 14 | file://devfs-udev.rules \ |
| 15 | file://init \ |
| 16 | file://links.conf \ |
| 17 | file://local.rules \ |
| 18 | file://permissions.rules \ |
| 19 | file://run.rules \ |
| 20 | file://udev.rules \ |
| 21 | " |
| 22 | UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases" |
| 23 | |
| 24 | SRC_URI[md5sum] = "41e19b70462692fefd072a3f38818b6e" |
| 25 | SRC_URI[sha256sum] = "3e4c56ec2fc1854afd0a31f3affa48f922c62d40ee12a0c1a4b4f152ef5b0f63" |
| 26 | |
| 27 | inherit autotools update-rc.d qemu pkgconfig |
| 28 | |
| 29 | EXTRA_OECONF = " \ |
| 30 | --sbindir=${base_sbindir} \ |
| 31 | --with-rootlibdir=${base_libdir} \ |
| 32 | --with-rootprefix= \ |
| 33 | " |
| 34 | |
| 35 | PACKAGECONFIG ??= "hwdb" |
| 36 | PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb" |
| 37 | |
| 38 | do_install_append() { |
| 39 | install -d ${D}${sysconfdir}/init.d |
| 40 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev |
| 41 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev |
| 42 | |
| 43 | install -d ${D}${sysconfdir}/udev/rules.d |
| 44 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules |
| 45 | |
| 46 | # Use classic network interface naming scheme |
| 47 | touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules |
| 48 | |
| 49 | # hid2hci has moved to bluez4. removed in udev as of version 169 |
| 50 | rm -f ${D}${base_libdir}/udev/hid2hci |
| 51 | } |
| 52 | |
| 53 | do_install_prepend_class-target () { |
| 54 | # Remove references to buildmachine |
| 55 | sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ |
| 56 | ${B}/src/udev/keyboard-keys-from-name.h |
| 57 | } |
| 58 | |
| 59 | INITSCRIPT_NAME = "udev" |
| 60 | INITSCRIPT_PARAMS = "start 04 S ." |
| 61 | |
| 62 | PACKAGES =+ "libudev" |
| 63 | PACKAGES =+ "eudev-hwdb" |
| 64 | |
| 65 | |
| 66 | FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm" |
| 67 | FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ |
| 68 | ${includedir}/libudev.h ${libdir}/libudev.so \ |
| 69 | ${includedir}/udev.h ${libdir}/libudev.la \ |
| 70 | ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc" |
| 71 | FILES_libudev = "${base_libdir}/libudev.so.*" |
| 72 | FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d" |
| 73 | |
| 74 | RDEPENDS_eudev-hwdb += "eudev" |
| 75 | |
| 76 | RPROVIDES_${PN} = "hotplug udev" |
| 77 | RPROVIDES_eudev-hwdb += "udev-hwdb" |
| 78 | |
| 79 | python () { |
| 80 | if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): |
| 81 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") |
| 82 | } |
| 83 | |
| 84 | PACKAGE_WRITE_DEPS += "qemu-native" |
| 85 | pkg_postinst_eudev-hwdb () { |
| 86 | if test -n "$D"; then |
| 87 | ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D |
| 88 | chown root:root $D${sysconfdir}/udev/hwdb.bin |
| 89 | else |
| 90 | udevadm hwdb --update |
| 91 | fi |
| 92 | } |
| 93 | |
| 94 | pkg_prerm_eudev-hwdb () { |
| 95 | rm -f $D${sysconfdir}/udev/hwdb.bin |
| 96 | } |