diff options
Diffstat (limited to 'meta/recipes-core/dbus/dbus_1.12.24.bb')
-rw-r--r-- | meta/recipes-core/dbus/dbus_1.12.24.bb | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus_1.12.24.bb b/meta/recipes-core/dbus/dbus_1.12.24.bb new file mode 100644 index 0000000000..cf6f7dc0ef --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.12.24.bb | |||
@@ -0,0 +1,147 @@ | |||
1 | SUMMARY = "D-Bus message bus" | ||
2 | DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed." | ||
3 | HOMEPAGE = "https://dbus.freedesktop.org" | ||
4 | SECTION = "base" | ||
5 | |||
6 | require dbus.inc | ||
7 | |||
8 | DEPENDS = "expat virtual/libintl autoconf-archive" | ||
9 | RDEPENDS_dbus_class-native = "" | ||
10 | RDEPENDS_dbus_class-nativesdk = "" | ||
11 | PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" | ||
12 | ALLOW_EMPTY_dbus-ptest = "1" | ||
13 | RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest" | ||
14 | |||
15 | inherit useradd update-rc.d | ||
16 | |||
17 | INITSCRIPT_NAME = "dbus-1" | ||
18 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
19 | |||
20 | python __anonymous() { | ||
21 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
22 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
23 | } | ||
24 | |||
25 | USERADD_PACKAGES = "${PN}" | ||
26 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ | ||
27 | --no-create-home --shell /bin/false \ | ||
28 | --user-group messagebus" | ||
29 | |||
30 | CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" | ||
31 | |||
32 | DEBIANNAME_${PN} = "dbus-1" | ||
33 | |||
34 | PACKAGES =+ "${PN}-lib" | ||
35 | |||
36 | OLDPKGNAME = "dbus-x11" | ||
37 | OLDPKGNAME_class-nativesdk = "" | ||
38 | |||
39 | # for compatibility | ||
40 | RPROVIDES_${PN} = "${OLDPKGNAME}" | ||
41 | RREPLACES_${PN} += "${OLDPKGNAME}" | ||
42 | |||
43 | FILES_${PN} = "${bindir}/dbus-daemon* \ | ||
44 | ${bindir}/dbus-uuidgen \ | ||
45 | ${bindir}/dbus-cleanup-sockets \ | ||
46 | ${bindir}/dbus-send \ | ||
47 | ${bindir}/dbus-monitor \ | ||
48 | ${bindir}/dbus-launch \ | ||
49 | ${bindir}/dbus-run-session \ | ||
50 | ${bindir}/dbus-update-activation-environment \ | ||
51 | ${libexecdir}/dbus* \ | ||
52 | ${sysconfdir} \ | ||
53 | ${localstatedir} \ | ||
54 | ${datadir}/dbus-1/services \ | ||
55 | ${datadir}/dbus-1/system-services \ | ||
56 | ${datadir}/dbus-1/session.d \ | ||
57 | ${datadir}/dbus-1/session.conf \ | ||
58 | ${datadir}/dbus-1/system.d \ | ||
59 | ${datadir}/dbus-1/system.conf \ | ||
60 | ${datadir}/xml/dbus-1 \ | ||
61 | ${systemd_system_unitdir} \ | ||
62 | ${systemd_user_unitdir} \ | ||
63 | ${nonarch_libdir}/sysusers.d/dbus.conf \ | ||
64 | ${nonarch_libdir}/tmpfiles.d/dbus.conf \ | ||
65 | " | ||
66 | FILES_${PN}-lib = "${libdir}/lib*.so.*" | ||
67 | RRECOMMENDS_${PN}-lib = "${PN}" | ||
68 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool" | ||
69 | |||
70 | PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" | ||
71 | pkg_postinst_dbus() { | ||
72 | # If both systemd and sysvinit are enabled, mask the dbus-1 init script | ||
73 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then | ||
74 | if [ -n "$D" ]; then | ||
75 | OPTS="--root=$D" | ||
76 | fi | ||
77 | systemctl $OPTS mask dbus-1.service | ||
78 | fi | ||
79 | |||
80 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
81 | /etc/init.d/populate-volatile.sh update | ||
82 | fi | ||
83 | } | ||
84 | |||
85 | |||
86 | EXTRA_OECONF += "--disable-tests" | ||
87 | |||
88 | do_install() { | ||
89 | autotools_do_install | ||
90 | |||
91 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
92 | install -d ${D}${sysconfdir}/init.d | ||
93 | sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh | ||
94 | install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | ||
95 | install -d ${D}${sysconfdir}/default/volatiles | ||
96 | echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ | ||
97 | > ${D}${sysconfdir}/default/volatiles/99_dbus | ||
98 | fi | ||
99 | |||
100 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
101 | for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ | ||
102 | install -d ${D}${systemd_system_unitdir}/$i; done | ||
103 | install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/ | ||
104 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket | ||
105 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket | ||
106 | ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service | ||
107 | fi | ||
108 | |||
109 | |||
110 | mkdir -p ${D}${localstatedir}/lib/dbus | ||
111 | |||
112 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus | ||
113 | |||
114 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | ||
115 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | ||
116 | |||
117 | # Remove Red Hat initscript | ||
118 | rm -rf ${D}${sysconfdir}/rc.d | ||
119 | |||
120 | # Remove empty testexec directory as we don't build tests | ||
121 | rm -rf ${D}${libdir}/dbus-1.0/test | ||
122 | |||
123 | # Remove /var/run as it is created on startup | ||
124 | rm -rf ${D}${localstatedir}/run | ||
125 | } | ||
126 | |||
127 | do_install_class-native() { | ||
128 | autotools_do_install | ||
129 | |||
130 | # dbus-launch has no X support so lets not install it in case the host | ||
131 | # has a more featured and useful version | ||
132 | rm -f ${D}${bindir}/dbus-launch | ||
133 | } | ||
134 | |||
135 | do_install_class-nativesdk() { | ||
136 | autotools_do_install | ||
137 | |||
138 | # dbus-launch has no X support so lets not install it in case the host | ||
139 | # has a more featured and useful version | ||
140 | rm -f ${D}${bindir}/dbus-launch | ||
141 | |||
142 | # Remove /var/run to avoid QA error | ||
143 | rm -rf ${D}${localstatedir}/run | ||
144 | } | ||
145 | BBCLASSEXTEND = "native nativesdk" | ||
146 | |||
147 | INSANE_SKIP_${PN}-ptest += "build-deps" | ||