source: scripts/scripts/untested/blfs-scripts/blfs-dbus.sh @ 0b402ff

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 0b402ff was 0b402ff, checked in by Jim Gifford <clfs@…>, 15 years ago

r698@server (orig r696): ryan | 2005-11-13 00:00:47 -0800

r704@rei: lfs | 2005-11-13 19:01:08 +1100
Import updates for untested blfs-scripts



  • Property mode set to 100755
File size: 1.9 KB
Line 
1#!/bin/bash
2
3### dbus ###
4
5cd ${SRC}
6LOG=dbus-blfs.log
7
8SELF=`basename ${0}`
9set_buildenv
10set_libdirname
11setup_multiarch
12if [ ! "${libdirname}" = "lib" ]; then
13   extra_conf="--libdir=/usr/${libdirname}"
14fi
15
16unpack_tarball dbus-${DBUS_VER}
17cd ${PKGDIR}
18
19max_log_init dbus ${DBUS_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
20CC="${CC-gcc} ${ARCH_CFLAGS}" \
21CXX="${CXX-g++} ${ARCH_CFLAGS}" \
22CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
23CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
24LDFLAGS="-L/usr/${libdirname}" \
25./configure --prefix=/usr ${extra_conf} \
26  --sysconfdir=/etc \
27  --localstatedir=/var \
28  --mandir=/usr/share/man \
29  --infodir=/usr/share/info \
30  --with-system-socket=/var/lib/dbus/system_bus_socket \
31   >> ${LOGFILE} 2>&1 &&
32echo " o Configure OK" &&
33
34min_log_init ${BUILDLOGS} &&
35make \
36   >> ${LOGFILE} 2>&1 &&
37echo " o Build OK" &&
38
39min_log_init ${INSTLOGS} &&
40(
41   # for the moment create messagebus group and user to be 65533...
42   groupadd -g 65533 messagebus
43   useradd -u 65533 -g messagebus -c "dbus messagebus user" -d /dev/null \
44           -s /bin/false messagebus
45   mkdir /var/lib/dbus
46   make install
47
48   cp bus/rc.messagebus /etc/rc.d/init.d/messagebus
49
50   sed -i -e 's@status \$processname@statusproc $processname@g' \
51          -e '/init.d\/functions/s@^#@@g' \
52          -e '/^processname=/s@^#@@g' \
53          -e 's@/usr/bin/dbus-daemon --system@loadproc &@g' \
54          -e 's@killall@killproc@g' \
55      /etc/rc.d/init.d/messagebus
56
57   for runlevel in 3 4 5; do
58      ln -sf ../init.d/messagebus /etc/rc.d/rc${runlevel}.d/S97messagebus
59   done
60
61   for runlevel in 0 1 2 6; do
62      ln -sf ../init.d/messagebus /etc/rc.d/rc${runlevel}.d/K03messagebus
63   done
64) >> ${LOGFILE} 2>&1 &&
65echo " o ALL OK" || barf
66
67cat <<EOF
68--------------------------------------------------------
69  Please edit /etc/rc.d/init.d/messagebus and fix up
70  the stop function so /var/run/dbus.pid gets removed
71--------------------------------------------------------
72EOF
73
Note: See TracBrowser for help on using the repository browser.