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.

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