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