dbus.mk 3.0 KB

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