# HG changeset patch # User Christophe Lincoln # Date 1210877210 -7200 # Node ID b5d96006ea4488cab0c86d3b1516b3c4d494f079 # Parent 74db74e7b9c3116d626d64ae238eeea93dd07aa6 Add dbus message BUS from Freedesktop diff -r 74db74e7b9c3 -r b5d96006ea44 dbus-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dbus-dev/receipt Thu May 15 20:46:50 2008 +0200 @@ -0,0 +1,19 @@ +# SliTaz package receipt. + +PACKAGE="dbus-dev" +VERSION="1.2.1" +CATEGORY="development" +SHORT_DESC="D-Bus is a message bus system devel files." +WANTED="dbus" +MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://www.freedesktop.org/wiki/Software/dbus" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + cp -a $_pkg/usr/include $fs/usr + cp -a $_pkg/usr/lib/*.*a $fs/usr/lib + cp -a $_pkg/usr/lib/dbus-1.0 $fs/usr/lib + cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib +} diff -r 74db74e7b9c3 -r b5d96006ea44 dbus/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dbus/receipt Thu May 15 20:46:50 2008 +0200 @@ -0,0 +1,75 @@ +# SliTaz package receipt. + +PACKAGE="dbus" +VERSION="1.2.1" +CATEGORY="x-window" +SHORT_DESC="D-Bus is a message bus system." +DEPENDS="expat xorg-libX11" +BUILD_DEPENDS="xorg-libX11-dev" +MAINTAINER="pankso@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.freedesktop.org/wiki/Software/dbus" +WGET_URL="http://dbus.freedesktop.org/releases/dbus/$TARBALL" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/dbus \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + $CONFIGURE_ARGS + make + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib $fs/usr/share + cp -a $_pkg/etc $fs + cp -a $_pkg/var $fs + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib + cp -a $_pkg/usr/lib/dbus $fs/usr/lib + # Remove helper (600 Kb). + rm $fs/usr/lib/dbus/dbus-daemon-launch-helper + cp -a $_pkg/usr/share/dbus* $fs/usr/share + # Init script + cp -a stuff/etc $fs + chown -R root.root $fs +} + +pre_install() +{ + local root + root=$1 + # Go for echoing on configuration files if any messagebus user + # was found. + if ! grep -q 'messagebus' $root/etc/passwd; then + echo -n "Adding user: messagebus..." + echo 'messagebus:x:25:25:DBUS Daemon User:/dev/null:/bin/false' >> $root/etc/passwd + echo 'messagebus:!:14013:0:99999:7:::' >> $root/etc/shadow + echo 'messagebus:x:25:' >> $root/etc/group + echo 'messagebus:!::' >> $root/etc/gshadow + status + fi + if ! grep -q ^DBUS_OPTIONS $root/etc/daemons.conf; then + echo -n "Configuring $root/etc/daemons.conf..." + cat >> $root/etc/daemons.conf << "EOT" +# DBUS daemon options. +DBUS_OPTIONS="--system" + +EOT + status + fi +} + +pre_remove() +{ + /etc/init.d/dbus stop + deluser messagebus +} diff -r 74db74e7b9c3 -r b5d96006ea44 dbus/stuff/etc/init.d/dbus --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dbus/stuff/etc/init.d/dbus Thu May 15 20:46:50 2008 +0200 @@ -0,0 +1,55 @@ +#!/bin/sh +# /etc/init.d/dbus: Start, stop and restart DBUS daemon on SliTaz, +# at boot time or with the command line. Daemons options are configured +# with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=DBUS +DESC="message bus daemon" +DAEMON=/usr/bin/dbus-daemon +OPTIONS=$DBUS_OPTIONS +PIDFILE=/var/run/dbus/pid + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0