You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
5.2 KiB

  1. #
  2. # Copyright (C) 2007-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. # Make sure to also update the dbus-x package
  9. PKG_NAME:=dbus
  10. PKG_VERSION:=1.9.14
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/
  14. PKG_MD5SUM:=32cd0d16067422bfd691e2f647b432b0
  15. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  16. PKG_LICENSE:=AFL-2.1
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. TARGET_LDFLAGS+= \
  23. -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
  24. define Package/dbus/Default
  25. SECTION:=utils
  26. CATEGORY:=Utilities
  27. TITLE:=Simple interprocess messaging system
  28. URL:=http://dbus.freedesktop.org/
  29. endef
  30. define Package/dbus/Default/description
  31. D-Bus is a message bus system, a simple way for applications to talk to one
  32. another. In addition to interprocess communication, D-Bus helps coordinate
  33. process lifecycle; it makes it simple and reliable to code a "single instance"
  34. application or daemon, and to launch applications and daemons on demand when
  35. their services are needed.
  36. endef
  37. define Package/libdbus
  38. $(call Package/dbus/Default)
  39. CATEGORY:=Libraries
  40. TITLE+= (library)
  41. DEPENDS:= +libpthread
  42. endef
  43. define Package/libdbus/Description
  44. $(call Package/dbus/Default/description)
  45. This package contains the D-Bus shared library.
  46. endef
  47. define Package/dbus
  48. $(call Package/dbus/Default)
  49. TITLE+= (daemon)
  50. DEPENDS:= +libexpat +libdbus
  51. endef
  52. define Package/dbus/Description
  53. $(call Package/dbus/Default/description)
  54. This package contains the D-Bus daemon.
  55. endef
  56. define Package/dbus-utils
  57. $(call Package/dbus/Default)
  58. TITLE+= (utilities)
  59. DEPENDS:= dbus
  60. endef
  61. define Package/dbus-utils/Description
  62. $(call Package/dbus/Default/description)
  63. This package contains D-Bus utilities.
  64. endef
  65. define Build/Prepare
  66. $(Build/Prepare/Default)
  67. $(SED) 's/-Wl,--gc-sections/--gc-sections/' $(PKG_BUILD_DIR)/configure
  68. endef
  69. CONFIGURE_ARGS += \
  70. --enable-shared \
  71. --enable-static \
  72. --disable-abstract-sockets \
  73. --disable-ansi \
  74. --disable-asserts \
  75. --disable-console-owner-file \
  76. --disable-doxygen-docs \
  77. --disable-compiler_coverage \
  78. --disable-selinux \
  79. --disable-tests \
  80. --disable-verbose-mode \
  81. --disable-xml-docs \
  82. --with-xml="expat" \
  83. --with-dbus-user=root \
  84. --with-dbus-daemondir="/usr/sbin" \
  85. --with-system-socket="/var/run/dbus/system_bus_socket" \
  86. --with-system-pid-file="/var/run/dbus.pid" \
  87. --without-x \
  88. --libexecdir=/usr/lib/dbus-1
  89. CONFIGURE_VARS+= \
  90. ac_cv_have_abstract_sockets="yes" \
  91. ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
  92. HOST_CONFIGURE_ARGS+= \
  93. --enable-shared \
  94. --enable-static \
  95. --disable-abstract-sockets \
  96. --disable-ansi \
  97. --disable-asserts \
  98. --disable-console-owner-file \
  99. --disable-docygen-docs \
  100. --disable-compiler_coverage \
  101. --disable-selinux \
  102. --disable-tests \
  103. --disable-verbose-mode \
  104. --disable-xml-docs \
  105. --with-dbus-user=root \
  106. --with-dbus-daemondir="$(STAGIND_DIR_HOST)/bin" \
  107. --with-system-socket="$(STAGING_DIR_HOST)/var/run/dbus/system_bus_socket" \
  108. --with-system-pid-file="$(STAGING_DIR_HOST)/var/run/dbus.pid" \
  109. --without-x \
  110. --libexecdir="$(STAGING_DIR_HOST)/lib/dbus-1"
  111. HOST_CONFIGURE_VARS+= \
  112. ac_cv_have_abstract_sockets="yes" \
  113. ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
  114. define Build/InstallDev
  115. $(INSTALL_DIR) $(1)/usr/include
  116. $(CP) \
  117. $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
  118. $(1)/usr/include/
  119. $(INSTALL_DIR) $(1)/usr/lib/dbus-1.0/include/dbus/
  120. $(INSTALL_DATA) \
  121. $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0/include/dbus/*.h \
  122. $(1)/usr/lib/dbus-1.0/include/dbus/
  123. $(INSTALL_DIR) $(1)/usr/lib
  124. $(INSTALL_DATA) \
  125. $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la,a} \
  126. $(1)/usr/lib/
  127. $(CP) \
  128. $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
  129. $(1)/usr/lib/
  130. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  131. $(INSTALL_DATA) \
  132. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
  133. $(1)/usr/lib/pkgconfig/
  134. endef
  135. define Package/dbus/conffiles
  136. /etc/dbus-1/session.conf
  137. /etc/dbus-1/system.conf
  138. endef
  139. define Package/libdbus/install
  140. $(INSTALL_DIR) $(1)/usr/lib
  141. $(CP) \
  142. $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* \
  143. $(1)/usr/lib/
  144. endef
  145. define Package/dbus/install
  146. $(INSTALL_DIR) $(1)/etc
  147. $(CP) \
  148. $(PKG_INSTALL_DIR)/etc/dbus-1 \
  149. $(1)/etc/
  150. $(INSTALL_DIR) $(1)/usr/lib/dbus-1
  151. $(INSTALL_BIN) \
  152. $(PKG_INSTALL_DIR)/usr/lib/dbus-1/dbus-daemon-launch-helper \
  153. $(1)/usr/lib/dbus-1/
  154. $(INSTALL_DIR) $(1)/usr/sbin
  155. $(INSTALL_BIN) \
  156. $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon \
  157. $(1)/usr/sbin/
  158. $(INSTALL_DIR) $(1)/usr/bin
  159. $(INSTALL_BIN) \
  160. $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen \
  161. $(1)/usr/bin/
  162. $(INSTALL_BIN) \
  163. $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \
  164. $(1)/usr/bin/dbus-launch.real
  165. $(INSTALL_BIN) \
  166. ./files/dbus-launch \
  167. $(1)/usr/bin/
  168. $(INSTALL_DIR) $(1)/etc/init.d
  169. $(INSTALL_BIN) \
  170. ./files/dbus.init \
  171. $(1)/etc/init.d/dbus
  172. endef
  173. define Package/dbus-utils/install
  174. $(INSTALL_DIR) $(1)/usr/bin
  175. $(INSTALL_BIN) \
  176. $(PKG_INSTALL_DIR)/usr/bin/dbus-{send,monitor,cleanup-sockets} \
  177. $(1)/usr/bin/
  178. endef
  179. $(eval $(call HostBuild))
  180. $(eval $(call BuildPackage,libdbus))
  181. $(eval $(call BuildPackage,dbus))
  182. $(eval $(call BuildPackage,dbus-utils))