dbus.inc 3.1 KB

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