]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/dbus/dbus.mk
Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
[coffee/buildroot.git] / package / dbus / dbus.mk
1 ################################################################################
2 #
3 # dbus
4 #
5 ################################################################################
6
7 DBUS_VERSION = 1.10.18
8 DBUS_SITE = http://dbus.freedesktop.org/releases/dbus
9 DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
10 DBUS_LICENSE_FILES = COPYING
11 DBUS_INSTALL_STAGING = YES
12
13 define DBUS_PERMISSIONS
14         /usr/libexec/dbus-daemon-launch-helper f 4755 0 0 - - - - -
15 endef
16
17 define DBUS_USERS
18         dbus -1 dbus -1 * /var/run/dbus - dbus DBus messagebus user
19 endef
20
21 DBUS_DEPENDENCIES = host-pkgconf expat
22
23 DBUS_CONF_ENV = ac_cv_have_abstract_sockets=yes
24 DBUS_CONF_OPTS = \
25         --with-dbus-user=dbus \
26         --disable-tests \
27         --disable-asserts \
28         --enable-abstract-sockets \
29         --disable-selinux \
30         --disable-xml-docs \
31         --disable-doxygen-docs \
32         --disable-dnotify \
33         --with-xml=expat \
34         --with-system-socket=/var/run/dbus/system_bus_socket \
35         --with-system-pid-file=/var/run/messagebus.pid \
36         --with-init-scripts=none
37
38 ifeq ($(BR2_STATIC_LIBS),y)
39 DBUS_CONF_OPTS += LIBS='-pthread'
40 endif
41
42 ifeq ($(BR2_microblaze),y)
43 # microblaze toolchain doesn't provide inotify_rm_* but does have sys/inotify.h
44 DBUS_CONF_OPTS += --disable-inotify
45 endif
46
47 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
48 DBUS_CONF_OPTS += --enable-selinux
49 DBUS_DEPENDENCIES += libselinux
50 else
51 DBUS_CONF_OPTS += --disable-selinux
52 endif
53
54 ifeq ($(BR2_PACKAGE_AUDIT)$(BR2_PACKAGE_LIBCAP_NG),yy)
55 DBUS_CONF_OPTS += --enable-libaudit
56 DBUS_DEPENDENCIES += audit libcap-ng
57 else
58 DBUS_CONF_OPTS += --disable-libaudit
59 endif
60
61 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
62 DBUS_CONF_OPTS += --with-x
63 DBUS_DEPENDENCIES += xlib_libX11
64 ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y)
65 DBUS_DEPENDENCIES += xlib_libSM
66 endif
67 else
68 DBUS_CONF_OPTS += --without-x
69 endif
70
71 ifeq ($(BR2_INIT_SYSTEMD),y)
72 DBUS_CONF_OPTS += \
73         --enable-systemd \
74         --with-systemdsystemunitdir=/usr/lib/systemd/system
75 DBUS_DEPENDENCIES += systemd
76 else
77 DBUS_CONF_OPTS += --disable-systemd
78 endif
79
80 # fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink)
81 define DBUS_REMOVE_VAR_LIB_DBUS
82         rm -rf $(TARGET_DIR)/var/lib/dbus
83 endef
84
85 DBUS_PRE_INSTALL_TARGET_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS
86
87 define DBUS_REMOVE_DEVFILES
88         rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
89 endef
90
91 DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES
92
93 define DBUS_INSTALL_INIT_SYSV
94         $(INSTALL) -m 0755 -D package/dbus/S30dbus \
95                 $(TARGET_DIR)/etc/init.d/S30dbus
96
97         mkdir -p $(TARGET_DIR)/var/lib
98         rm -rf $(TARGET_DIR)/var/lib/dbus
99         ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus
100 endef
101
102 define DBUS_INSTALL_INIT_SYSTEMD
103         mkdir -p $(TARGET_DIR)/var/lib/dbus
104         ln -sf /etc/machine-id $(TARGET_DIR)/var/lib/dbus/machine-id
105 endef
106
107 HOST_DBUS_DEPENDENCIES = host-pkgconf host-expat
108 HOST_DBUS_CONF_OPTS = \
109         --with-dbus-user=dbus \
110         --disable-tests \
111         --disable-asserts \
112         --enable-abstract-sockets \
113         --disable-selinux \
114         --disable-xml-docs \
115         --disable-doxygen-docs \
116         --enable-dnotify \
117         --without-x \
118         --with-xml=expat
119
120 # dbus for the host
121 DBUS_HOST_INTROSPECT = $(HOST_DBUS_DIR)/introspect.xml
122
123 HOST_DBUS_GEN_INTROSPECT = \
124         $(HOST_DIR)/bin/dbus-daemon --introspect > $(DBUS_HOST_INTROSPECT)
125
126 HOST_DBUS_POST_INSTALL_HOOKS += HOST_DBUS_GEN_INTROSPECT
127
128 $(eval $(autotools-package))
129 $(eval $(host-autotools-package))