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