diff options
Diffstat (limited to 'meta/recipes-core/udev/eudev_3.2.bb')
-rw-r--r-- | meta/recipes-core/udev/eudev_3.2.bb | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/eudev_3.2.bb b/meta/recipes-core/udev/eudev_3.2.bb new file mode 100644 index 0000000000..6270617bda --- /dev/null +++ b/meta/recipes-core/udev/eudev_3.2.bb | |||
@@ -0,0 +1,109 @@ | |||
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 \ | ||
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] = "9eb477cc8718db272b5d24dff1126b04" | ||
24 | SRC_URI[sha256sum] = "37829d37f4beb7e358ca33abc1ad0907d87f917ce157777aeaeebeacae24efdc" | ||
25 | |||
26 | inherit autotools update-rc.d qemu | ||
27 | |||
28 | EXTRA_OECONF = " \ | ||
29 | --sbindir=${base_sbindir} \ | ||
30 | --libexecdir=${nonarch_base_libdir} \ | ||
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 | install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache | ||
42 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev | ||
43 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache | ||
44 | |||
45 | install -d ${D}${sysconfdir}/default | ||
46 | install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache | ||
47 | |||
48 | touch ${D}${sysconfdir}/udev/cache.data | ||
49 | |||
50 | install -d ${D}${sysconfdir}/udev/rules.d | ||
51 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules | ||
52 | |||
53 | # Use classic network interface naming scheme | ||
54 | touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules | ||
55 | |||
56 | # Fix for multilib systems where libs along with confs are installed incorrectly | ||
57 | if ! [ -d ${D}${nonarch_base_libdir}/udev ] | ||
58 | then | ||
59 | install -d ${D}${nonarch_base_libdir}/udev | ||
60 | mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir} | ||
61 | fi | ||
62 | |||
63 | # hid2hci has moved to bluez4. removed in udev as of version 169 | ||
64 | rm -f ${D}${base_libdir}/udev/hid2hci | ||
65 | } | ||
66 | |||
67 | INITSCRIPT_PACKAGES = "eudev udev-cache" | ||
68 | INITSCRIPT_NAME_eudev = "udev" | ||
69 | INITSCRIPT_PARAMS_eudev = "start 04 S ." | ||
70 | INITSCRIPT_NAME_udev-cache = "udev-cache" | ||
71 | INITSCRIPT_PARAMS_udev-cache = "start 36 S ." | ||
72 | |||
73 | PACKAGES =+ "libudev" | ||
74 | PACKAGES =+ "udev-cache" | ||
75 | PACKAGES =+ "eudev-hwdb" | ||
76 | |||
77 | |||
78 | FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm" | ||
79 | FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ | ||
80 | ${includedir}/libudev.h ${libdir}/libudev.so \ | ||
81 | ${includedir}/udev.h ${libdir}/libudev.la \ | ||
82 | ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc" | ||
83 | FILES_libudev = "${base_libdir}/libudev.so.*" | ||
84 | FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" | ||
85 | FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d" | ||
86 | |||
87 | RDEPENDS_eudev-hwdb += "eudev" | ||
88 | |||
89 | RRECOMMENDS_${PN} += "udev-cache" | ||
90 | |||
91 | RPROVIDES_${PN} = "hotplug udev" | ||
92 | |||
93 | python () { | ||
94 | if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
95 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") | ||
96 | } | ||
97 | |||
98 | pkg_postinst_eudev-hwdb () { | ||
99 | if test -n "$D"; then | ||
100 | ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D | ||
101 | chown root:root $D${sysconfdir}/udev/hwdb.bin | ||
102 | else | ||
103 | udevadm hwdb --update | ||
104 | fi | ||
105 | } | ||
106 | |||
107 | pkg_prerm_eudev-hwdb () { | ||
108 | rm -f $D${sysconfdir}/udev/hwdb.bin | ||
109 | } | ||