diff options
Diffstat (limited to 'meta/recipes-core/dbus/dbus_1.12.10.bb')
-rw-r--r-- | meta/recipes-core/dbus/dbus_1.12.10.bb | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus_1.12.10.bb b/meta/recipes-core/dbus/dbus_1.12.10.bb new file mode 100644 index 0000000000..d71f7f7042 --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.12.10.bb | |||
@@ -0,0 +1,176 @@ | |||
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" | ||
4 | SECTION = "base" | ||
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 autoconf-archive" | ||
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" | ||
14 | |||
15 | SRC_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 | |||
21 | SRC_URI[md5sum] = "c3e12b4206e2a7da39d7cc42567790ef" | ||
22 | SRC_URI[sha256sum] = "4b693d24976258c3f2fa9cc33ad9288c5fbfa7a16481dbd9a8a429f7aa8cdcf7" | ||
23 | |||
24 | inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even | ||
25 | |||
26 | INITSCRIPT_NAME = "dbus-1" | ||
27 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
28 | |||
29 | python __anonymous() { | ||
30 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
31 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
32 | } | ||
33 | |||
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" | ||
39 | |||
40 | CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" | ||
41 | |||
42 | DEBIANNAME_${PN} = "dbus-1" | ||
43 | |||
44 | PACKAGES =+ "${PN}-lib" | ||
45 | |||
46 | OLDPKGNAME = "dbus-x11" | ||
47 | OLDPKGNAME_class-nativesdk = "" | ||
48 | |||
49 | # for compatibility | ||
50 | RPROVIDES_${PN} = "${OLDPKGNAME}" | ||
51 | RREPLACES_${PN} += "${OLDPKGNAME}" | ||
52 | |||
53 | FILES_${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 | " | ||
76 | FILES_${PN}-lib = "${libdir}/lib*.so.*" | ||
77 | RRECOMMENDS_${PN}-lib = "${PN}" | ||
78 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool" | ||
79 | |||
80 | PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" | ||
81 | pkg_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 | |||
95 | EXTRA_OECONF = "--disable-tests \ | ||
96 | --disable-xml-docs \ | ||
97 | --disable-doxygen-docs \ | ||
98 | --disable-libaudit \ | ||
99 | --enable-largefile \ | ||
100 | " | ||
101 | |||
102 | EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl" | ||
103 | EXTRA_OECONF_append_class-native = " --disable-selinux" | ||
104 | |||
105 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
106 | user-session \ | ||
107 | " | ||
108 | |||
109 | PACKAGECONFIG_class-native = "" | ||
110 | PACKAGECONFIG_class-nativesdk = "" | ||
111 | |||
112 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd" | ||
113 | PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" | ||
114 | PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session" | ||
115 | |||
116 | do_install() { | ||
117 | autotools_do_install | ||
118 | |||
119 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
120 | install -d ${D}${sysconfdir}/init.d | ||
121 | sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh | ||
122 | install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | ||
123 | fi | ||
124 | |||
125 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
126 | for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ | ||
127 | install -d ${D}${systemd_system_unitdir}/$i; done | ||
128 | install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/ | ||
129 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket | ||
130 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket | ||
131 | ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service | ||
132 | fi | ||
133 | |||
134 | install -d ${D}${sysconfdir}/default/volatiles | ||
135 | echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ | ||
136 | > ${D}${sysconfdir}/default/volatiles/99_dbus | ||
137 | |||
138 | |||
139 | mkdir -p ${D}${localstatedir}/lib/dbus | ||
140 | |||
141 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus | ||
142 | |||
143 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | ||
144 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | ||
145 | |||
146 | # Remove Red Hat initscript | ||
147 | rm -rf ${D}${sysconfdir}/rc.d | ||
148 | |||
149 | # Remove empty testexec directory as we don't build tests | ||
150 | rm -rf ${D}${libdir}/dbus-1.0/test | ||
151 | |||
152 | # Remove /var/run as it is created on startup | ||
153 | rm -rf ${D}${localstatedir}/run | ||
154 | } | ||
155 | |||
156 | do_install_class-native() { | ||
157 | autotools_do_install | ||
158 | |||
159 | # dbus-launch has no X support so lets not install it in case the host | ||
160 | # has a more featured and useful version | ||
161 | rm -f ${D}${bindir}/dbus-launch | ||
162 | } | ||
163 | |||
164 | do_install_class-nativesdk() { | ||
165 | autotools_do_install | ||
166 | |||
167 | # dbus-launch has no X support so lets not install it in case the host | ||
168 | # has a more featured and useful version | ||
169 | rm -f ${D}${bindir}/dbus-launch | ||
170 | |||
171 | # Remove /var/run to avoid QA error | ||
172 | rm -rf ${D}${localstatedir}/run | ||
173 | } | ||
174 | BBCLASSEXTEND = "native nativesdk" | ||
175 | |||
176 | INSANE_SKIP_${PN}-ptest += "build-deps" | ||