dbus/rc.dbus

Wed, 30 Mar 2011 19:35:16 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 30 Mar 2011 19:35:16 +0200
changeset 335
6eb79a12ee37
permissions
-rw-r--r--

Finally correct packaging logic enough to allow for successful building:
Force Java dependency to C++ and POSIX threads to satisfy buildtime
requirements of GCJ, add conditional java dependency to infozip as
required by libjava/configure, remove outdated fortran conditions,
correct buildconf causing jcf-dump target to fail, add and improve
warnings regarding profile feedback, build duration, and parallel
make, correct make environment when building C++ dependent languages,
and introduce new helpful comments.

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.dbus -- Run-Commands
     4 ##
     6 %config
     7     dbus_enable="$openpkg_rc_def"
     8     dbus_flags="--system --fork"
    10 %common
    11     dbus_pidfile="@l_prefix@/var/dbus/run/dbus.pid"
    12     dbus_cfgfile="@l_prefix@/etc/dbus/system.conf"
    13     dbus_signal () {
    14         [ -f $dbus_pidfile ] && kill -$1 `cat $dbus_pidfile`
    15     }
    17 %status -u @l_susr@ -o
    18     dbus_usable="unknown"
    19     dbus_active="no"
    20     rcService dbus enable yes && \
    21         dbus_signal 0 && dbus_active="yes"
    22     echo "dbus_enable=\"$dbus_enable\""
    23     echo "dbus_usable=\"$dbus_usable\""
    24     echo "dbus_active=\"$dbus_active\""
    26 %start -u @l_susr@
    27     rcService dbus enable yes || exit 0
    28     rcService dbus active yes && exit 0
    29     @l_prefix@/lib/dbus/bin/dbus-daemon $dbus_flags >/dev/null 2>&1
    31 %stop -u @l_susr@
    32     rcService dbus enable yes || exit 0
    33     rcService dbus active no && exit 0
    34     dbus_signal TERM
    35     sleep 2
    36     rm -f $dbus_pidfile 2>/dev/null || true
    38 %restart -u @l_susr@
    39     rcService dbus enable yes || exit 0
    40     rcService dbus active no && exit 0
    41     rc dbus stop start

mercurial