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