[617118d] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | ### dbus ### |
---|
| 4 | |
---|
| 5 | cd ${SRC} |
---|
| 6 | LOG=dbus-blfs.log |
---|
| 7 | |
---|
| 8 | SELF=`basename ${0}` |
---|
| 9 | set_buildenv |
---|
| 10 | set_libdirname |
---|
| 11 | setup_multiarch |
---|
| 12 | if [ ! "${libdirname}" = "lib" ]; then |
---|
| 13 | extra_conf="--libdir=/usr/${libdirname}" |
---|
| 14 | fi |
---|
| 15 | |
---|
| 16 | unpack_tarball dbus-${DBUS_VER} |
---|
| 17 | cd ${PKGDIR} |
---|
| 18 | |
---|
| 19 | max_log_init dbus ${DBUS_VER} "blfs (shared)" ${CONFLOGS} ${LOG} |
---|
| 20 | CC="${CC-gcc} ${ARCH_CFLAGS}" \ |
---|
| 21 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \ |
---|
[0b402ff] | 22 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \ |
---|
| 23 | CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \ |
---|
| 24 | LDFLAGS="-L/usr/${libdirname}" \ |
---|
[617118d] | 25 | ./configure --prefix=/usr ${extra_conf} \ |
---|
[0b402ff] | 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 \ |
---|
[617118d] | 31 | >> ${LOGFILE} 2>&1 && |
---|
| 32 | echo " o Configure OK" && |
---|
| 33 | |
---|
| 34 | min_log_init ${BUILDLOGS} && |
---|
| 35 | make \ |
---|
| 36 | >> ${LOGFILE} 2>&1 && |
---|
| 37 | echo " o Build OK" && |
---|
| 38 | |
---|
| 39 | min_log_init ${INSTLOGS} && |
---|
[0b402ff] | 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 && |
---|
[617118d] | 65 | echo " o ALL OK" || barf |
---|
| 66 | |
---|
[0b402ff] | 67 | cat <<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 | -------------------------------------------------------- |
---|
| 72 | EOF |
---|
| 73 | |
---|