recipes: libs/readline: downgraded to the version 7.0. Some programs are expecting...
[dragora.git] / recipes / daemons / dbus / recipe
blob776fdbc9a9820ec9ae7e78bbc1298387ffa65076
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.
18 program=dbus
19 version=1.12.12
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/daemons"
25 tarname=${program}-${version}.tar.gz
27 # Remote source(s)
28 fetch=http://dbus.freedesktop.org/releases/dbus/$tarname
30 description="
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}"
45 build()
47     set -e
49     unpack "${tardir}/$tarname"
50     
51     cd "$srcdir"
53     # Set sane permissions
54     chmod -R u+w,go-w,a+rX-s .
55     
56     ./configure \
57     CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
58      $configure_args \
59      --libdir=/usr/lib${libSuffix} \
60      --mandir=$mandir \
61      --enable-static=no \
62      --enable-shared=yes \
63      --enable-debug=no \
64      --enable-inotify \
65      --enable-epoll \
66      --disable-x11-autolaunch \
67      --disable-systemd \
68      --disable-selinux \
69      --with-valgrind \
70      --with-dbus-user=messagebus \
71      --with-xml=expat \
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 \
76      --without-x \
77      --build="$(cc -dumpmachine)"
78     
79     make -j${jobs} V=1
80     make -j${jobs} DESTDIR="$destdir" install-strip
82     # Compress and link man pages (if needed)
83     if test -d "${destdir}/$mandir"
84     then
85         (
86             cd "${destdir}/$mandir"
87             find . -type f -exec lzip -9 '{}' +
88             find . -type l | while read -r file
89             do
90                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
91                 rm -- "$file"
92             done
93         )
94     fi
95     
96     # Copy documentation
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"