dbus.mk 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ################################################################################
  2. #
  3. # dbus
  4. #
  5. ################################################################################
  6. DBUS_VERSION = 1.10.18
  7. DBUS_SITE = http://dbus.freedesktop.org/releases/dbus
  8. DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
  9. DBUS_LICENSE_FILES = COPYING
  10. DBUS_INSTALL_STAGING = YES
  11. define DBUS_PERMISSIONS
  12. /usr/libexec/dbus-daemon-launch-helper f 4755 0 0 - - - - -
  13. endef
  14. define DBUS_USERS
  15. dbus -1 dbus -1 * /var/run/dbus - dbus DBus messagebus user
  16. endef
  17. DBUS_DEPENDENCIES = host-pkgconf expat
  18. DBUS_CONF_ENV = ac_cv_have_abstract_sockets=yes
  19. DBUS_CONF_OPTS = \
  20. --with-dbus-user=dbus \
  21. --disable-tests \
  22. --disable-asserts \
  23. --enable-abstract-sockets \
  24. --disable-selinux \
  25. --disable-xml-docs \
  26. --disable-doxygen-docs \
  27. --disable-dnotify \
  28. --with-xml=expat \
  29. --with-system-socket=/var/run/dbus/system_bus_socket \
  30. --with-system-pid-file=/var/run/messagebus.pid \
  31. --with-init-scripts=none
  32. ifeq ($(BR2_STATIC_LIBS),y)
  33. DBUS_CONF_OPTS += LIBS='-pthread'
  34. endif
  35. ifeq ($(BR2_microblaze),y)
  36. # microblaze toolchain doesn't provide inotify_rm_* but does have sys/inotify.h
  37. DBUS_CONF_OPTS += --disable-inotify
  38. endif
  39. ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
  40. DBUS_CONF_OPTS += --enable-selinux
  41. DBUS_DEPENDENCIES += libselinux
  42. else
  43. DBUS_CONF_OPTS += --disable-selinux
  44. endif
  45. ifeq ($(BR2_PACKAGE_AUDIT)$(BR2_PACKAGE_LIBCAP_NG),yy)
  46. DBUS_CONF_OPTS += --enable-libaudit
  47. DBUS_DEPENDENCIES += audit libcap-ng
  48. else
  49. DBUS_CONF_OPTS += --disable-libaudit
  50. endif
  51. ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
  52. DBUS_CONF_OPTS += --with-x
  53. DBUS_DEPENDENCIES += xlib_libX11
  54. ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y)
  55. DBUS_DEPENDENCIES += xlib_libSM
  56. endif
  57. else
  58. DBUS_CONF_OPTS += --without-x
  59. endif
  60. ifeq ($(BR2_INIT_SYSTEMD),y)
  61. DBUS_CONF_OPTS += \
  62. --enable-systemd \
  63. --with-systemdsystemunitdir=/usr/lib/systemd/system
  64. DBUS_DEPENDENCIES += systemd
  65. else
  66. DBUS_CONF_OPTS += --disable-systemd
  67. endif
  68. # fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink)
  69. define DBUS_REMOVE_VAR_LIB_DBUS
  70. rm -rf $(TARGET_DIR)/var/lib/dbus
  71. endef
  72. DBUS_PRE_INSTALL_TARGET_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS
  73. define DBUS_REMOVE_DEVFILES
  74. rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
  75. endef
  76. DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES
  77. define DBUS_INSTALL_INIT_SYSV
  78. $(INSTALL) -m 0755 -D package/dbus/S30dbus \
  79. $(TARGET_DIR)/etc/init.d/S30dbus
  80. mkdir -p $(TARGET_DIR)/var/lib
  81. rm -rf $(TARGET_DIR)/var/lib/dbus
  82. ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus
  83. endef
  84. define DBUS_INSTALL_INIT_SYSTEMD
  85. mkdir -p $(TARGET_DIR)/var/lib/dbus
  86. ln -sf /etc/machine-id $(TARGET_DIR)/var/lib/dbus/machine-id
  87. endef
  88. HOST_DBUS_DEPENDENCIES = host-pkgconf host-expat
  89. HOST_DBUS_CONF_OPTS = \
  90. --with-dbus-user=dbus \
  91. --disable-tests \
  92. --disable-asserts \
  93. --enable-abstract-sockets \
  94. --disable-selinux \
  95. --disable-xml-docs \
  96. --disable-doxygen-docs \
  97. --enable-dnotify \
  98. --without-x \
  99. --with-xml=expat
  100. # dbus for the host
  101. DBUS_HOST_INTROSPECT = $(HOST_DBUS_DIR)/introspect.xml
  102. HOST_DBUS_GEN_INTROSPECT = \
  103. $(HOST_DIR)/bin/dbus-daemon --introspect > $(DBUS_HOST_INTROSPECT)
  104. HOST_DBUS_POST_INSTALL_HOOKS += HOST_DBUS_GEN_INTROSPECT
  105. $(eval $(autotools-package))
  106. $(eval $(host-autotools-package))