summaryrefslogtreecommitdiff
path: root/repo/system/dbus.xibuild
blob: 66ea737dd12415f1f9ec68ab36bb84c8ff43b8c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh

MAKEDEPS="make "
DEPS="elogind"

PKG_VER=1.12.20
SOURCE=https://dbus.freedesktop.org/releases/dbus/dbus-$PKG_VER.tar.gz

ADDITIONAL="
dbus.confd
dbus.initd
dbus.trigger
"

DESC="A message bus system allowing applications to talk to one another"

build () {
    ./configure --prefix=/usr                        \
            --sysconfdir=/etc                    \
            --localstatedir=/var                 \
            --enable-user-session                \
            --disable-doxygen-docs               \
            --disable-xml-docs                   \
            --disable-static                     \
            --with-systemduserunitdir=no         \
            --with-systemdsystemunitdir=no       \
            --docdir=/usr/share/doc/dbus-$PKG_VER \
            --with-console-auth-dir=/run/console \
            --with-system-pid-file=/run/dbus/pid \
            --with-system-socket=/run/dbus/system_bus_socket \
            --with-x &&
    make
}

package () {
    make DESTDIR=$PKG_DEST install

    chown  root:messagebus $PKG_DEST/usr/libexec/dbus-daemon-launch-helper &&
    chmod       4750       $PKG_DEST/usr/libexec/dbus-daemon-launch-helper
    
    cat > $PKG_DEST/etc/dbus-1/session-local.conf << "EOF"
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- Search for .service files in /usr/local -->
  <servicedir>/usr/local/share/dbus-1/services</servicedir>

</busconfig>
EOF

    install -Dm755 dbus.initd $PKG_DEST/etc/init.d/dbus
	install -Dm644 dbus.confd $PKG_DEST/etc/conf.d/dbus
}

postinstall () {
    rc-update add dbus
    rc-service dbus start
}