1 # Build recipe for dbus.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/daemons"
25 tarname=${program}-${version}.tar.gz
28 fetch=http://dbus.freedesktop.org/releases/dbus/$tarname
31 A system daemon and a per user login session daemon.
33 The message bus is built on top of a general one-to-one message passing
34 framework, which can be used by any two apps to communicate directly
35 (without going through the message bus daemon).
38 homepage=http://www.freedesktop.org/wiki/Software/dbus/
39 license="AFLv2.1 | GPLv2+"
41 # Source documentation
42 docs="AUTHORS COPYING ChangeLog NEWS README"
43 docsdir="${docdir}/${program}-${version}"
49 unpack "${tardir}/$tarname"
53 # Set sane permissions
54 chmod -R u+w,go-w,a+rX-s .
57 CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
59 --libdir=/usr/lib${libSuffix} \
66 --disable-x11-autolaunch \
70 --with-dbus-user=messagebus \
72 --with-console-auth-dir=/var/run/console \
73 --with-system-pid-file=/var/run/dbus/dbus.pid \
74 --with-system-socket=/var/run/dbus/system_bus_socket \
75 --with-session-socket-dir=/tmp \
77 --build="$(cc -dumpmachine)"
80 make -j${jobs} DESTDIR="$destdir" install-strip
82 # Compress and link man pages (if needed)
83 if test -d "${destdir}/$mandir"
86 cd "${destdir}/$mandir"
87 find . -type f -exec lzip -9 '{}' +
88 find . -type l | while read -r file
90 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
97 mkdir -p "${destdir}${docsdir}"
98 cp -p $docs "${destdir}${docsdir}/"
100 # Install perp service for dbus
102 mkdir -p "${destdir}/etc/perp/dbus"
104 cp -p "${worktree}/archive/dbus/rc.log" \
105 "${worktree}/archive/dbus/rc.main" \
106 "${destdir}/etc/perp/dbus/"
108 chmod 755 "${destdir}"/etc/perp/dbus/rc.*
110 # Be an active service by default
111 chmod +t "${destdir}/etc/perp/dbus"
113 # To handle config file(s)
114 touch "${destdir}/etc/dbus-1/.graft-config" \
115 "${destdir}/etc/perp/dbus/.graft-config"