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', '${PN}-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 \
22 inherit useradd autotools pkgconfig gettext update-rc.d
24 INITSCRIPT_NAME = "dbus-1"
25 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
27 python __anonymous() {
28 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
29 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
32 USERADD_PACKAGES = "${PN}"
33 GROUPADD_PARAM_${PN} = "-r netdev"
34 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
35 --no-create-home --shell /bin/false \
36 --user-group messagebus"
38 CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
40 DEBIANNAME_${PN} = "dbus-1"
42 PACKAGES =+ "${PN}-lib"
44 OLDPKGNAME = "dbus-x11"
45 OLDPKGNAME_class-nativesdk = ""
48 RPROVIDES_${PN} = "${OLDPKGNAME}"
49 RREPLACES_${PN} += "${OLDPKGNAME}"
51 FILES_${PN} = "${bindir}/dbus-daemon* \
52 ${bindir}/dbus-uuidgen \
53 ${bindir}/dbus-cleanup-sockets \
55 ${bindir}/dbus-monitor \
56 ${bindir}/dbus-launch \
57 ${bindir}/dbus-run-session \
61 ${datadir}/dbus-1/services \
62 ${datadir}/dbus-1/system-services \
63 ${systemd_unitdir}/system/"
64 FILES_${PN}-lib = "${libdir}/lib*.so.*"
65 RRECOMMENDS_${PN}-lib = "${PN}"
66 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
69 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
70 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
74 systemctl $OPTS mask dbus-1.service
77 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
78 /etc/init.d/populate-volatile.sh update
82 EXTRA_OECONF = "--disable-tests \
84 --disable-doxygen-docs \
89 EXTRA_OECONF_append_class-native = " --disable-selinux"
91 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
92 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
93 PACKAGECONFIG_class-native = ""
94 PACKAGECONFIG_class-nativesdk = ""
96 # Would like to --enable-systemd but that's a circular build-dependency between
98 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
99 PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
104 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
105 install -d ${D}${sysconfdir}/init.d
106 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
107 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
110 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
111 for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
112 install -d ${D}${systemd_unitdir}/system/$i; done
113 install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/
114 cd ${D}${systemd_unitdir}/system/dbus.target.wants/
115 ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket
116 ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket
117 ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service
120 install -d ${D}${sysconfdir}/default/volatiles
121 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
122 > ${D}${sysconfdir}/default/volatiles/99_dbus
125 mkdir -p ${D}${localstatedir}/lib/dbus
127 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
129 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
130 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
132 # Remove Red Hat initscript
133 rm -rf ${D}${sysconfdir}/rc.d
135 # Remove empty testexec directory as we don't build tests
136 rm -rf ${D}${libdir}/dbus-1.0/test
138 # Remove /var/run as it is created on startup
139 rm -rf ${D}${localstatedir}/run
142 do_install_class-native() {
145 # for dbus-glib-native introspection generation
146 install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
147 # N.B. is below install actually required?
148 install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
150 # dbus-glib-native and dbus-glib need this xml file
151 ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
153 # dbus-launch has no X support so lets not install it in case the host
154 # has a more featured and useful version
155 rm -f ${D}${bindir}/dbus-launch
158 do_install_class-nativesdk() {
161 # dbus-launch has no X support so lets not install it in case the host
162 # has a more featured and useful version
163 rm -f ${D}${bindir}/dbus-launch
165 # Remove /var/run to avoid QA error
166 rm -rf ${D}${localstatedir}/run
168 BBCLASSEXTEND = "native nativesdk"
170 INSANE_SKIP_${PN}-ptest += "build-deps"