haserl: moved to github
[packages.git] / utils / dbus / Makefile
1 #
2 # Copyright (C) 2007-2011 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.4.14
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:=ae6de2562a57516cfabaf56903375ba9
18
19 PKG_FIXUP:=autoreconf
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   DEPENDS:= +librt
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 define Build/Prepare
79         $(Build/Prepare/Default)
80         $(SED) 's/-Wl,--gc-sections/--gc-sections/' $(PKG_BUILD_DIR)/configure
81 endef
82
83 CONFIGURE_ARGS += \
84         --enable-shared \
85         --enable-static \
86         --disable-abstract-sockets \
87         --disable-ansi \
88         --disable-asserts \
89         --disable-console-owner-file \
90         --disable-doxygen-docs \
91         --disable-compiler_coverage \
92         --disable-selinux \
93         --disable-tests \
94         --disable-verbose-mode \
95         --disable-xml-docs \
96         --with-xml="expat" \
97         --with-dbus-user=root \
98         --with-dbus-daemondir="/usr/sbin" \
99         --with-system-socket="/var/run/dbus/system_bus_socket" \
100         --with-system-pid-file="/var/run/dbus.pid" \
101         --without-x \
102         --libexecdir=/usr/lib/dbus-1
103
104 CONFIGURE_VARS+= \
105         ac_cv_have_abstract_sockets="yes" \
106         ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
107
108
109 define Build/InstallDev
110         $(INSTALL_DIR) $(1)/usr/include
111         $(CP) \
112                 $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
113                 $(1)/usr/include/
114         $(INSTALL_DIR) $(1)/usr/lib/dbus-1.0/include/dbus/
115         $(INSTALL_DATA) \
116                 $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0/include/dbus/*.h \
117                 $(1)/usr/lib/dbus-1.0/include/dbus/
118
119         $(INSTALL_DIR) $(1)/usr/lib
120         $(INSTALL_DATA) \
121                 $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la,a} \
122                 $(1)/usr/lib/
123         $(CP) \
124                 $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
125                 $(1)/usr/lib/
126         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
127         $(INSTALL_DATA) \
128                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
129                 $(1)/usr/lib/pkgconfig/
130 endef
131
132 define Package/dbus/conffiles
133 /etc/dbus-1/session.conf
134 /etc/dbus-1/system.conf
135 endef
136
137 define Package/libdbus/install
138         $(INSTALL_DIR) $(1)/usr/lib
139         $(CP) \
140                 $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* \
141                 $(1)/usr/lib/
142 endef
143
144 define Package/dbus/install
145         $(INSTALL_DIR) $(1)/etc
146         $(CP) \
147                 $(PKG_INSTALL_DIR)/etc/dbus-1 \
148                 $(1)/etc/
149
150         $(INSTALL_DIR) $(1)/usr/lib/dbus-1
151         $(INSTALL_BIN) \
152                 $(PKG_INSTALL_DIR)/usr/lib/dbus-1/dbus-daemon-launch-helper \
153                 $(1)/usr/lib/dbus-1/
154
155         $(INSTALL_DIR) $(1)/usr/sbin
156         $(INSTALL_BIN) \
157                 $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon \
158                 $(1)/usr/sbin/
159
160         $(INSTALL_DIR) $(1)/usr/bin
161         $(INSTALL_BIN) \
162                 $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen \
163                 $(1)/usr/bin/
164
165         $(INSTALL_BIN) \
166                 $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \
167                 $(1)/usr/bin/dbus-launch.real
168         $(INSTALL_BIN) \
169                 ./files/dbus-launch \
170                 $(1)/usr/bin/
171
172         $(INSTALL_DIR) $(1)/etc/init.d
173         $(INSTALL_BIN) \
174                 ./files/dbus.init \
175                 $(1)/etc/init.d/dbus
176 endef
177
178 define Package/dbus-utils/install
179         $(INSTALL_DIR) $(1)/usr/bin
180         $(INSTALL_BIN) \
181                 $(PKG_INSTALL_DIR)/usr/bin/dbus-{send,monitor,cleanup-sockets} \
182                 $(1)/usr/bin/
183 endef
184
185 $(eval $(call BuildPackage,libdbus))
186 $(eval $(call BuildPackage,dbus))
187 $(eval $(call BuildPackage,dbus-utils))