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