diff options
Diffstat (limited to 'meta/recipes-core/dbus/dbus_1.14.4.bb')
-rw-r--r-- | meta/recipes-core/dbus/dbus_1.14.4.bb | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus_1.14.4.bb b/meta/recipes-core/dbus/dbus_1.14.4.bb new file mode 100644 index 0000000000..cf7f830f16 --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.14.4.bb | |||
@@ -0,0 +1,185 @@ | |||
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 | inherit autotools pkgconfig gettext upstream-version-is-even ptest-gnome | ||
7 | |||
8 | LICENSE = "AFL-2.1 | GPL-2.0-or-later" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=6423dcd74d7be9715b0db247fd889da3 \ | ||
10 | file://dbus/dbus.h;beginline=6;endline=20;md5=866739837ccd835350af94dccd6457d8 \ | ||
11 | " | ||
12 | |||
13 | SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.xz \ | ||
14 | file://run-ptest \ | ||
15 | file://tmpdir.patch \ | ||
16 | file://dbus-1.init \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[sha256sum] = "7c0f9b8e5ec0ff2479383e62c0084a3a29af99edf1514e9f659b81b30d4e353e" | ||
20 | |||
21 | EXTRA_OECONF = "--disable-xml-docs \ | ||
22 | --disable-doxygen-docs \ | ||
23 | --enable-largefile \ | ||
24 | --with-system-socket=/run/dbus/system_bus_socket \ | ||
25 | --enable-tests \ | ||
26 | --enable-checks \ | ||
27 | --enable-asserts \ | ||
28 | --runstatedir=/run \ | ||
29 | " | ||
30 | EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl" | ||
31 | |||
32 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
33 | user-session \ | ||
34 | " | ||
35 | PACKAGECONFIG:class-native = "" | ||
36 | PACKAGECONFIG:class-nativesdk = "" | ||
37 | |||
38 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd" | ||
39 | PACKAGECONFIG[x11] = "--enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" | ||
40 | PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session" | ||
41 | PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,," | ||
42 | PACKAGECONFIG[audit] = "--enable-libaudit,--disable-libaudit,audit" | ||
43 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
44 | |||
45 | DEPENDS = "expat virtual/libintl autoconf-archive glib-2.0" | ||
46 | RDEPENDS:${PN} += "${PN}-common ${PN}-tools" | ||
47 | RDEPENDS:${PN}:class-native = "" | ||
48 | |||
49 | inherit useradd update-rc.d | ||
50 | |||
51 | INITSCRIPT_NAME = "dbus-1" | ||
52 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
53 | |||
54 | python __anonymous() { | ||
55 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
56 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
57 | } | ||
58 | |||
59 | PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools" | ||
60 | |||
61 | USERADD_PACKAGES = "dbus-common" | ||
62 | USERADD_PARAM:dbus-common = "--system --home ${localstatedir}/lib/dbus \ | ||
63 | --no-create-home --shell /bin/false \ | ||
64 | --user-group messagebus" | ||
65 | |||
66 | CONFFILES:${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" | ||
67 | |||
68 | DEBIANNAME:${PN} = "dbus-1" | ||
69 | |||
70 | OLDPKGNAME = "dbus-x11" | ||
71 | OLDPKGNAME:class-nativesdk = "" | ||
72 | |||
73 | # for compatibility | ||
74 | RPROVIDES:${PN} = "${OLDPKGNAME}" | ||
75 | RREPLACES:${PN} += "${OLDPKGNAME}" | ||
76 | |||
77 | FILES:${PN} = "${bindir}/dbus-daemon* \ | ||
78 | ${bindir}/dbus-cleanup-sockets \ | ||
79 | ${bindir}/dbus-launch \ | ||
80 | ${bindir}/dbus-run-session \ | ||
81 | ${libexecdir}/dbus* \ | ||
82 | ${sysconfdir} \ | ||
83 | ${localstatedir} \ | ||
84 | ${systemd_system_unitdir} \ | ||
85 | ${systemd_user_unitdir} \ | ||
86 | ${nonarch_libdir}/tmpfiles.d/dbus.conf \ | ||
87 | " | ||
88 | FILES:${PN}-common = "${sysconfdir}/dbus-1 \ | ||
89 | ${datadir}/dbus-1/services \ | ||
90 | ${datadir}/dbus-1/system-services \ | ||
91 | ${datadir}/dbus-1/session.d \ | ||
92 | ${datadir}/dbus-1/session.conf \ | ||
93 | ${datadir}/dbus-1/system.d \ | ||
94 | ${datadir}/dbus-1/system.conf \ | ||
95 | ${systemd_system_unitdir}/dbus.socket \ | ||
96 | ${systemd_system_unitdir}/sockets.target.wants \ | ||
97 | ${systemd_user_unitdir}/dbus.socket \ | ||
98 | ${systemd_user_unitdir}/sockets.target.wants \ | ||
99 | ${nonarch_libdir}/sysusers.d/dbus.conf \ | ||
100 | " | ||
101 | FILES:${PN}-tools = "${bindir}/dbus-uuidgen \ | ||
102 | ${bindir}/dbus-send \ | ||
103 | ${bindir}/dbus-monitor \ | ||
104 | ${bindir}/dbus-update-activation-environment \ | ||
105 | " | ||
106 | FILES:${PN}-lib = "${libdir}/lib*.so.*" | ||
107 | RRECOMMENDS:${PN}-lib = "${PN}" | ||
108 | FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1" | ||
109 | |||
110 | RDEPENDS:${PN}-ptest += "bash make dbus" | ||
111 | |||
112 | PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" | ||
113 | pkg_postinst:dbus() { | ||
114 | # If both systemd and sysvinit are enabled, mask the dbus-1 init script | ||
115 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then | ||
116 | if [ -n "$D" ]; then | ||
117 | OPTS="--root=$D" | ||
118 | fi | ||
119 | systemctl $OPTS mask dbus-1.service | ||
120 | fi | ||
121 | |||
122 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
123 | /etc/init.d/populate-volatile.sh update | ||
124 | fi | ||
125 | } | ||
126 | |||
127 | |||
128 | do_install() { | ||
129 | autotools_do_install | ||
130 | |||
131 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
132 | install -d ${D}${sysconfdir}/init.d | ||
133 | sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh | ||
134 | install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | ||
135 | install -d ${D}${sysconfdir}/default/volatiles | ||
136 | echo "d messagebus messagebus 0755 /run/dbus none" \ | ||
137 | > ${D}${sysconfdir}/default/volatiles/99_dbus | ||
138 | fi | ||
139 | |||
140 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
141 | for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ | ||
142 | install -d ${D}${systemd_system_unitdir}/$i; done | ||
143 | install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/ | ||
144 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket | ||
145 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket | ||
146 | ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service | ||
147 | fi | ||
148 | |||
149 | |||
150 | mkdir -p ${D}${localstatedir}/lib/dbus | ||
151 | |||
152 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus | ||
153 | |||
154 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | ||
155 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | ||
156 | |||
157 | # Remove Red Hat initscript | ||
158 | rm -rf ${D}${sysconfdir}/rc.d | ||
159 | |||
160 | # Remove empty testexec directory as we don't build tests | ||
161 | rm -rf ${D}${libdir}/dbus-1.0/test | ||
162 | |||
163 | # Remove /var/run as it is created on startup | ||
164 | rm -rf ${D}${localstatedir}/run | ||
165 | } | ||
166 | |||
167 | do_install:class-native() { | ||
168 | autotools_do_install | ||
169 | |||
170 | # dbus-launch has no X support so lets not install it in case the host | ||
171 | # has a more featured and useful version | ||
172 | rm -f ${D}${bindir}/dbus-launch | ||
173 | } | ||
174 | |||
175 | do_install:class-nativesdk() { | ||
176 | autotools_do_install | ||
177 | |||
178 | # dbus-launch has no X support so lets not install it in case the host | ||
179 | # has a more featured and useful version | ||
180 | rm -f ${D}${bindir}/dbus-launch | ||
181 | |||
182 | # Remove /var/run to avoid QA error | ||
183 | rm -rf ${D}${localstatedir}/run | ||
184 | } | ||
185 | BBCLASSEXTEND = "native nativesdk" | ||