netboot-launcher-efl: Bump version to 0.2.2 and fix download link.
[openembedded.git] / recipes / dbus / dbus.inc
1 DESCRIPTION = "A message bus system for inter-process communication"
2 HOMEPAGE = "http://dbus.freedesktop.org"
3 SECTION = "base"
4 LICENSE = "GPL"
5 DEPENDS = "expat glib-2.0 virtual/libintl libsm libice virtual/libx11"
6
7 INC_PR = "r18"
8
9 SRC_URI = "\
10   http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz;name=dbus \
11   file://cross.patch;patch=1 \
12   file://tmpdir.patch;patch=1 \
13   file://fix-install-daemon.patch;patch=1 \
14   file://0001-Make-the-default-DBus-reply-timeout-configurable.patch;patch=1 \
15   file://dbus-1.init \
16 "
17
18 S = "${WORKDIR}/dbus-${PV}"
19
20 inherit autotools pkgconfig update-rc.d gettext
21
22 EXTRA_OECONF_X = "--with-x"
23
24 EXTRA_OECONF = "\
25   --disable-qt \
26   --disable-qt3 \
27   --disable-gtk \
28   --disable-tests \
29   --disable-checks \
30   --disable-xml-docs \
31   --disable-doxygen-docs \
32   --disable-libaudit \
33   --with-xml=expat \
34   --with-dbus-default-reply-timeout=200000 \
35   ${EXTRA_OECONF_X} \
36 "
37
38 do_compile_prepend_mipsel() {
39         sed -i -e 's/\-fPIE//' -e 's/\-pie\ \-Wl\,\-z\,relro//' bus/Makefile
40 }
41
42 do_install_append() {
43         install -d ${D}${sysconfdir}/init.d
44         install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
45         # the stock install seems to install the libtool wrapper script, so we have to copy this manually :M:
46         if [ -e bus/.libs/dbus-daemon-launch-helper ]; then
47                 install -d  ${D}${libexecdir}/
48                 install -m 0755 bus/.libs/dbus-daemon-launch-helper ${D}${libexecdir}/
49         fi
50 }
51
52 RDEPENDS_${PN}-x11 = "${PN}"
53 RRECOMMENDS_${PN}-lib = "${PN}"
54 RCONFLICTS_${PN} = "dbus-1"
55 RREPLACES_${PN} = "dbus-1"
56 RPROVIDES_${PN} = "dbus-1"
57
58 PACKAGES =+ "${PN}-lib ${PN}-x11"
59
60 FILES_${PN} = "\
61 ${bindir}/dbus-daemon* \
62 ${bindir}/dbus-uuidgen \
63 ${bindir}/dbus-cleanup-sockets \
64 ${bindir}/dbus-send \
65 ${bindir}/dbus-monitor \
66 ${libexecdir}/dbus* \
67 ${sysconfdir} \
68 ${datadir}/dbus-1/services \
69 ${datadir}/dbus-1/system-services \
70 "
71 FILES_${PN}-lib = "${libdir}/lib*.so.*"
72 FILES_${PN}-x11 = "\
73 ${bindir}/dbus-launch \
74 "
75 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool ${libdir}/"
76
77 pkg_postinst_${PN}() {
78 #!/bin/sh
79 # can't do adduser stuff offline
80 if [ "x$D" != "x" ]; then
81   exit 1
82 fi
83 MESSAGEUSER=messagebus
84 MESSAGEHOME=/var/run/dbus
85 mkdir -p $MESSAGEHOME || true
86 grep -q ^$MESSAGEUSER: /etc/group || addgroup "$MESSAGEUSER"
87 chgrp "$MESSAGEUSER" "$MESSAGEHOME"
88 grep -q ^$MESSAGEUSER: /etc/passwd || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
89 chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME"
90 grep -q netdev: /etc/group || addgroup netdev
91 chmod u+s /usr/libexec/dbus-daemon-launch-helper
92 }
93
94 CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
95
96 INITSCRIPT_NAME = "dbus-1"
97 INITSCRIPT_PARAMS = "start 02 5 2 . stop 20 0 1 6 ."