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