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