wok-6.x rev 790
Add dbus message BUS from Freedesktop
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 15 20:46:50 2008 +0200 (2008-05-15) |
parents | 74db74e7b9c3 |
children | a515fcc7a579 |
files | dbus-dev/receipt dbus/receipt dbus/stuff/etc/init.d/dbus |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dbus-dev/receipt Thu May 15 20:46:50 2008 +0200 1.3 @@ -0,0 +1,19 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="dbus-dev" 1.7 +VERSION="1.2.1" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="D-Bus is a message bus system devel files." 1.10 +WANTED="dbus" 1.11 +MAINTAINER="pankso@slitaz.org" 1.12 +WEB_SITE="http://www.freedesktop.org/wiki/Software/dbus" 1.13 + 1.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.15 +genpkg_rules() 1.16 +{ 1.17 + mkdir -p $fs/usr/lib 1.18 + cp -a $_pkg/usr/include $fs/usr 1.19 + cp -a $_pkg/usr/lib/*.*a $fs/usr/lib 1.20 + cp -a $_pkg/usr/lib/dbus-1.0 $fs/usr/lib 1.21 + cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib 1.22 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/dbus/receipt Thu May 15 20:46:50 2008 +0200 2.3 @@ -0,0 +1,75 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="dbus" 2.7 +VERSION="1.2.1" 2.8 +CATEGORY="x-window" 2.9 +SHORT_DESC="D-Bus is a message bus system." 2.10 +DEPENDS="expat xorg-libX11" 2.11 +BUILD_DEPENDS="xorg-libX11-dev" 2.12 +MAINTAINER="pankso@slitaz.org" 2.13 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.14 +WEB_SITE="http://www.freedesktop.org/wiki/Software/dbus" 2.15 +WGET_URL="http://dbus.freedesktop.org/releases/dbus/$TARBALL" 2.16 + 2.17 +# Rules to configure and make the package. 2.18 +compile_rules() 2.19 +{ 2.20 + cd $src 2.21 + ./configure \ 2.22 + --prefix=/usr \ 2.23 + --libexecdir=/usr/lib/dbus \ 2.24 + --sysconfdir=/etc \ 2.25 + --localstatedir=/var \ 2.26 + --mandir=/usr/share/man \ 2.27 + $CONFIGURE_ARGS 2.28 + make 2.29 + make DESTDIR=$PWD/_pkg install 2.30 +} 2.31 + 2.32 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.33 +genpkg_rules() 2.34 +{ 2.35 + mkdir -p $fs/usr/lib $fs/usr/share 2.36 + cp -a $_pkg/etc $fs 2.37 + cp -a $_pkg/var $fs 2.38 + cp -a $_pkg/usr/bin $fs/usr 2.39 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 2.40 + cp -a $_pkg/usr/lib/dbus $fs/usr/lib 2.41 + # Remove helper (600 Kb). 2.42 + rm $fs/usr/lib/dbus/dbus-daemon-launch-helper 2.43 + cp -a $_pkg/usr/share/dbus* $fs/usr/share 2.44 + # Init script 2.45 + cp -a stuff/etc $fs 2.46 + chown -R root.root $fs 2.47 +} 2.48 + 2.49 +pre_install() 2.50 +{ 2.51 + local root 2.52 + root=$1 2.53 + # Go for echoing on configuration files if any messagebus user 2.54 + # was found. 2.55 + if ! grep -q 'messagebus' $root/etc/passwd; then 2.56 + echo -n "Adding user: messagebus..." 2.57 + echo 'messagebus:x:25:25:DBUS Daemon User:/dev/null:/bin/false' >> $root/etc/passwd 2.58 + echo 'messagebus:!:14013:0:99999:7:::' >> $root/etc/shadow 2.59 + echo 'messagebus:x:25:' >> $root/etc/group 2.60 + echo 'messagebus:!::' >> $root/etc/gshadow 2.61 + status 2.62 + fi 2.63 + if ! grep -q ^DBUS_OPTIONS $root/etc/daemons.conf; then 2.64 + echo -n "Configuring $root/etc/daemons.conf..." 2.65 + cat >> $root/etc/daemons.conf << "EOT" 2.66 +# DBUS daemon options. 2.67 +DBUS_OPTIONS="--system" 2.68 + 2.69 +EOT 2.70 + status 2.71 + fi 2.72 +} 2.73 + 2.74 +pre_remove() 2.75 +{ 2.76 + /etc/init.d/dbus stop 2.77 + deluser messagebus 2.78 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/dbus/stuff/etc/init.d/dbus Thu May 15 20:46:50 2008 +0200 3.3 @@ -0,0 +1,55 @@ 3.4 +#!/bin/sh 3.5 +# /etc/init.d/dbus: Start, stop and restart DBUS daemon on SliTaz, 3.6 +# at boot time or with the command line. Daemons options are configured 3.7 +# with /etc/daemons.conf 3.8 +# 3.9 +. /etc/init.d/rc.functions 3.10 +. /etc/daemons.conf 3.11 + 3.12 +NAME=DBUS 3.13 +DESC="message bus daemon" 3.14 +DAEMON=/usr/bin/dbus-daemon 3.15 +OPTIONS=$DBUS_OPTIONS 3.16 +PIDFILE=/var/run/dbus/pid 3.17 + 3.18 +case "$1" in 3.19 + start) 3.20 + if [ -f $PIDFILE ] ; then 3.21 + echo "$NAME already running." 3.22 + exit 1 3.23 + fi 3.24 + echo -n "Starting $DESC: $NAME... " 3.25 + $DAEMON $OPTIONS 3.26 + status 3.27 + ;; 3.28 + stop) 3.29 + if [ ! -f $PIDFILE ] ; then 3.30 + echo "$NAME is not running." 3.31 + exit 1 3.32 + fi 3.33 + echo -n "Stopping $DESC: $NAME... " 3.34 + kill `cat $PIDFILE` 3.35 + rm $PIDFILE 3.36 + status 3.37 + ;; 3.38 + restart) 3.39 + if [ ! -f $PIDFILE ] ; then 3.40 + echo "$NAME is not running." 3.41 + exit 1 3.42 + fi 3.43 + echo -n "Restarting $DESC: $NAME... " 3.44 + kill `cat $PIDFILE` 3.45 + rm $PIDFILE 3.46 + sleep 2 3.47 + $DAEMON $OPTIONS 3.48 + status 3.49 + ;; 3.50 + *) 3.51 + echo "" 3.52 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 3.53 + echo "" 3.54 + exit 1 3.55 + ;; 3.56 +esac 3.57 + 3.58 +exit 0