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