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