Run `dbus-uuidgen --ensure` before launching the dbus daemon.
[openwrt/svn-archive/archive.git] / utils / dbus / Makefile
1 #
2 # Copyright (C) 2007-2008 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 PKG_NAME:=dbus
12 PKG_VERSION:=1.2.3
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:=f71641385768e99361bd298568207cee
18
19 include $(INCLUDE_DIR)/package.mk
20
21 PKG_INSTALL=1
22
23 TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
24
25 define Package/dbus/Default
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=Simple interprocess messaging system
29 URL:=http://dbus.freedesktop.org/
30 endef
31
32 define Package/dbus/Default/description
33 D-Bus is a message bus system, a simple way for applications to talk to one
34 another. In addition to interprocess communication, D-Bus helps coordinate
35 process lifecycle; it makes it simple and reliable to code a "single instance"
36 application or daemon, and to launch applications and daemons on demand when
37 their services are needed.
38 endef
39
40
41 define Package/dbus
42 $(call Package/dbus/Default)
43 TITLE+= (daemon)
44 DEPENDS:= +libexpat
45 endef
46
47 define Package/dbus/Description
48 $(call Package/dbus/Default/description)
49 This package contains the D-Bus daemon.
50 endef
51
52
53 define Package/dbus-utils
54 $(call Package/dbus/Default)
55 TITLE+= (utilities)
56 DEPENDS:= dbus
57 endef
58
59 define Package/dbus-utils/Description
60 $(call Package/dbus/Default/description)
61 This package contains D-Bus utilities.
62 endef
63
64
65 CONFIGURE_ARGS += \
66 --enable-shared \
67 --enable-static \
68 --disable-abstract-sockets \
69 --disable-ansi \
70 --disable-asserts \
71 --disable-console-owner-file \
72 --disable-doxygen-docs \
73 --disable-gcov \
74 --disable-selinux \
75 --disable-tests \
76 --disable-verbose-mode \
77 --disable-xml-docs \
78 --with-xml="expat" \
79 --with-dbus-user=root \
80 --with-dbus-daemondir="/usr/sbin" \
81 --with-system-socket="/var/run/dbus/system_bus_socket" \
82 --with-system-pid-file="/var/run/dbus.pid" \
83 --without-x
84
85 CONFIGURE_VARS+= \
86 ac_cv_have_abstract_sockets="yes" \
87 $(if $(CONFIG_LINUX_2_4),ac_cv_header_sys_inotify_h=no) \
88
89
90 define Build/InstallDev
91 $(INSTALL_DIR) $(1)/usr/include
92 $(CP) \
93 $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
94 $(1)/usr/include/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(INSTALL_DATA) \
97 $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{a,so*} \
98 $(1)/usr/lib/
99 $(CP) \
100 $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
101 $(1)/usr/lib/
102 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
103 $(INSTALL_DATA) \
104 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
105 $(1)/usr/lib/pkgconfig/
106 endef
107
108 define Package/dbus/conffiles
109 /etc/dbus-1/session.conf
110 /etc/dbus-1/system.conf
111 endef
112
113 define Package/dbus/install
114 $(INSTALL_DIR) $(1)/etc
115 $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1 $(1)/etc/
116 $(INSTALL_DIR) $(1)/usr/lib
117 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* $(1)/usr/lib/
118 $(INSTALL_DIR) $(1)/usr/sbin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon $(1)/usr/sbin/
120 $(INSTALL_DIR) $(1)/etc/init.d
121 $(INSTALL_BIN) ./files/dbus.init $(1)/etc/init.d/dbus
122 endef
123
124
125 define Package/dbus-utils/install
126 $(INSTALL_DIR) $(1)/usr/bin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-* $(1)/usr/bin/
128 endef
129
130
131 $(eval $(call BuildPackage,dbus))
132 $(eval $(call BuildPackage,dbus-utils))
133