diff options
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 @@ | |||
1 | SUMMARY = "eudev is a fork of systemd's udev" | ||
2 | HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev" | ||
3 | LICENSE = "GPLv2.0+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
5 | |||
6 | DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux" | ||
7 | |||
8 | PROVIDES = "udev" | ||
9 | |||
10 | SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ | ||
11 | file://devfs-udev.rules \ | ||
12 | file://init \ | ||
13 | file://links.conf \ | ||
14 | file://local.rules \ | ||
15 | file://permissions.rules \ | ||
16 | file://run.rules \ | ||
17 | file://udev-cache \ | ||
18 | file://udev-cache.default \ | ||
19 | file://udev.rules \ | ||
20 | " | ||
21 | UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases" | ||
22 | |||
23 | SRC_URI[md5sum] = "a2aae16bc432eac0e71c1267c384e295" | ||
24 | SRC_URI[sha256sum] = "88f530c1540750e6daa91b5eaeebf88e761e6f0c86515c1c28eedfd871f027c6" | ||
25 | |||
26 | inherit autotools update-rc.d qemu pkgconfig | ||
27 | |||
28 | EXTRA_OECONF = " \ | ||
29 | --sbindir=${base_sbindir} \ | ||
30 | --with-rootlibdir=${base_libdir} \ | ||
31 | --with-rootprefix= \ | ||
32 | " | ||
33 | |||
34 | PACKAGECONFIG ??= "hwdb" | ||
35 | PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb" | ||
36 | |||
37 | do_install_append() { | ||
38 | install -d ${D}${sysconfdir}/init.d | ||
39 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev | ||
40 | install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache | ||
41 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev | ||
42 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache | ||
43 | |||
44 | install -d ${D}${sysconfdir}/default | ||
45 | install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache | ||
46 | |||
47 | touch ${D}${sysconfdir}/udev/cache.data | ||
48 | |||
49 | install -d ${D}${sysconfdir}/udev/rules.d | ||
50 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules | ||
51 | |||
52 | # Use classic network interface naming scheme | ||
53 | touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules | ||
54 | |||
55 | # hid2hci has moved to bluez4. removed in udev as of version 169 | ||
56 | rm -f ${D}${base_libdir}/udev/hid2hci | ||
57 | } | ||
58 | |||
59 | INITSCRIPT_PACKAGES = "eudev udev-cache" | ||
60 | INITSCRIPT_NAME_eudev = "udev" | ||
61 | INITSCRIPT_PARAMS_eudev = "start 04 S ." | ||
62 | INITSCRIPT_NAME_udev-cache = "udev-cache" | ||
63 | INITSCRIPT_PARAMS_udev-cache = "start 36 S ." | ||
64 | |||
65 | PACKAGES =+ "libudev" | ||
66 | PACKAGES =+ "udev-cache" | ||
67 | PACKAGES =+ "eudev-hwdb" | ||
68 | |||
69 | |||
70 | FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm" | ||
71 | FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ | ||
72 | ${includedir}/libudev.h ${libdir}/libudev.so \ | ||
73 | ${includedir}/udev.h ${libdir}/libudev.la \ | ||
74 | ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc" | ||
75 | FILES_libudev = "${base_libdir}/libudev.so.*" | ||
76 | FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" | ||
77 | FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d" | ||
78 | |||
79 | RDEPENDS_eudev-hwdb += "eudev" | ||
80 | |||
81 | RRECOMMENDS_${PN} += "udev-cache" | ||
82 | |||
83 | RPROVIDES_${PN} = "hotplug udev" | ||
84 | RPROVIDES_eudev-hwdb += "udev-hwdb" | ||
85 | |||
86 | python () { | ||
87 | if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
88 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") | ||
89 | } | ||
90 | |||
91 | PACKAGE_WRITE_DEPS += "qemu-native" | ||
92 | pkg_postinst_eudev-hwdb () { | ||
93 | if test -n "$D"; then | ||
94 | ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D | ||
95 | chown root:root $D${sysconfdir}/udev/hwdb.bin | ||
96 | else | ||
97 | udevadm hwdb --update | ||
98 | fi | ||
99 | } | ||
100 | |||
101 | pkg_prerm_eudev-hwdb () { | ||
102 | rm -f $D${sysconfdir}/udev/hwdb.bin | ||
103 | } | ||