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 = "http://dbus.freedesktop.org"
5 LICENSE = "AFL-2 | GPLv2+"
6 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
7 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8 DEPENDS = "expat virtual/libintl"
9 RDEPENDS_dbus_class-native = ""
10 RDEPENDS_dbus_class-nativesdk = ""
11 PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
12 ALLOW_EMPTY_dbus-ptest = "1"
13 RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
15 SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
18 file://os-test.patch \
19 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
20 file://Set-correct-address-when-using-address-systemd.patch \
21 file://fixed-memory-freeing-if-error-during-listing-service.patch \
24 inherit useradd autotools pkgconfig gettext update-rc.d
26 INITSCRIPT_NAME = "dbus-1"
27 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
29 python __anonymous() {
30 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
31 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
34 USERADD_PACKAGES = "${PN}"
35 GROUPADD_PARAM_${PN} = "-r netdev"
36 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
37 --no-create-home --shell /bin/false \
38 --user-group messagebus"
40 CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
42 DEBIANNAME_${PN} = "dbus-1"
44 PACKAGES =+ "${PN}-lib"
46 OLDPKGNAME = "dbus-x11"
47 OLDPKGNAME_class-nativesdk = ""
50 RPROVIDES_${PN} = "${OLDPKGNAME}"
51 RREPLACES_${PN} += "${OLDPKGNAME}"
53 FILES_${PN} = "${bindir}/dbus-daemon* \
54 ${bindir}/dbus-uuidgen \
55 ${bindir}/dbus-cleanup-sockets \
57 ${bindir}/dbus-monitor \
58 ${bindir}/dbus-launch \
62 ${datadir}/dbus-1/services \
63 ${datadir}/dbus-1/system-services \
64 ${systemd_unitdir}/system/"
65 FILES_${PN}-lib = "${libdir}/lib*.so.*"
66 RRECOMMENDS_${PN}-lib = "${PN}"
67 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
70 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
71 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
75 systemctl $OPTS mask dbus-1.service
78 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
79 /etc/init.d/populate-volatile.sh update
83 EXTRA_OECONF = "--disable-tests \
85 --disable-doxygen-docs \
90 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
91 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
92 PACKAGECONFIG_class-native = ""
93 PACKAGECONFIG_class-nativesdk = ""
95 # Would like to --enable-systemd but that's a circular build-dependency between
97 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
98 PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
103 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
104 install -d ${D}${sysconfdir}/init.d
105 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
106 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
109 install -d ${D}${sysconfdir}/default/volatiles
110 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
111 > ${D}${sysconfdir}/default/volatiles/99_dbus
114 mkdir -p ${D}${localstatedir}/lib/dbus
116 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
118 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
119 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
121 # Remove Red Hat initscript
122 rm -rf ${D}${sysconfdir}/rc.d
124 # Remove empty testexec directory as we don't build tests
125 rm -rf ${D}${libdir}/dbus-1.0/test
127 # Remove /var/run as it is created on startup
128 rm -rf ${D}${localstatedir}/run
131 do_install_class-native() {
134 # for dbus-glib-native introspection generation
135 install -d ${STAGING_DATADIR_NATIVE}/dbus/
136 # N.B. is below install actually required?
137 install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf
139 # dbus-glib-native and dbus-glib need this xml file
140 ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
142 # dbus-launch has no X support so lets not install it in case the host
143 # has a more featured and useful version
144 rm -f ${D}${bindir}/dbus-launch
147 do_install_class-nativesdk() {
150 # dbus-launch has no X support so lets not install it in case the host
151 # has a more featured and useful version
152 rm -f ${D}${bindir}/dbus-launch
154 # Remove /var/run to avoid QA error
155 rm -rf ${D}${localstatedir}/run
157 BBCLASSEXTEND = "native nativesdk"