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