avrusbboot: fix compile
[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.12
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:=39bd582c3b06a261cac44d4cab6fd60b
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 CONFIGURE_ARGS += \
78 --enable-shared \
79 --enable-static \
80 --disable-abstract-sockets \
81 --disable-ansi \
82 --disable-asserts \
83 --disable-console-owner-file \
84 --disable-doxygen-docs \
85 --disable-gcov \
86 --disable-selinux \
87 --disable-tests \
88 --disable-verbose-mode \
89 --disable-xml-docs \
90 --with-xml="expat" \
91 --with-dbus-user=root \
92 --with-dbus-daemondir="/usr/sbin" \
93 --with-system-socket="/var/run/dbus/system_bus_socket" \
94 --with-system-pid-file="/var/run/dbus.pid" \
95 --without-x \
96 --libexecdir=/usr/lib/dbus-1
97
98 CONFIGURE_VARS+= \
99 ac_cv_have_abstract_sockets="yes" \
100 $(if $(CONFIG_LINUX_2_4),ac_cv_header_sys_inotify_h=no) \
101
102
103 define Build/InstallDev
104 $(INSTALL_DIR) $(1)/usr/include
105 $(CP) \
106 $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
107 $(1)/usr/include/
108 $(INSTALL_DIR) $(1)/usr/lib/dbus-1.0/include/dbus/
109 $(INSTALL_DATA) \
110 $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0/include/dbus/*.h \
111 $(1)/usr/lib/dbus-1.0/include/dbus/
112
113 $(INSTALL_DIR) $(1)/usr/lib
114 $(INSTALL_DATA) \
115 $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la,a} \
116 $(1)/usr/lib/
117 $(CP) \
118 $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
119 $(1)/usr/lib/
120 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
121 $(INSTALL_DATA) \
122 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
123 $(1)/usr/lib/pkgconfig/
124 endef
125
126 define Package/dbus/conffiles
127 /etc/dbus-1/session.conf
128 /etc/dbus-1/system.conf
129 endef
130
131 define Package/libdbus/install
132 $(INSTALL_DIR) $(1)/usr/lib
133 $(CP) \
134 $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* \
135 $(1)/usr/lib/
136 endef
137
138 define Package/dbus/install
139 $(INSTALL_DIR) $(1)/etc
140 $(CP) \
141 $(PKG_INSTALL_DIR)/etc/dbus-1 \
142 $(1)/etc/
143
144 $(INSTALL_DIR) $(1)/usr/lib/dbus-1
145 $(INSTALL_BIN) \
146 $(PKG_INSTALL_DIR)/usr/lib/dbus-1/dbus-daemon-launch-helper \
147 $(1)/usr/lib/dbus-1/
148
149 $(INSTALL_DIR) $(1)/usr/sbin
150 $(INSTALL_BIN) \
151 $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon \
152 $(1)/usr/sbin/
153
154 $(INSTALL_DIR) $(1)/usr/bin
155 $(INSTALL_BIN) \
156 $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen \
157 $(1)/usr/bin/
158
159 $(INSTALL_BIN) \
160 $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \
161 $(1)/usr/bin/dbus-launch.real
162 $(INSTALL_BIN) \
163 ./files/dbus-launch \
164 $(1)/usr/bin/
165
166 $(INSTALL_DIR) $(1)/etc/init.d
167 $(INSTALL_BIN) \
168 ./files/dbus.init \
169 $(1)/etc/init.d/dbus
170 endef
171
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
179 $(eval $(call BuildPackage,libdbus))
180 $(eval $(call BuildPackage,dbus))
181 $(eval $(call BuildPackage,dbus-utils))