wok-current rev 792
Add hal - Hardware Abstraction Layer
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 15 20:48:24 2008 +0200 (2008-05-15) |
parents | a515fcc7a579 |
children | 252084f1cb73 |
files | hal-dev/receipt hal-extra/receipt hal/receipt hal/stuff/etc/init.d/hald |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/hal-dev/receipt Thu May 15 20:48:24 2008 +0200 1.3 @@ -0,0 +1,18 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="hal-dev" 1.7 +VERSION="0.5.11" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Hal devel files." 1.10 +WANTED="hal" 1.11 +MAINTAINER="pankso@slitaz.org" 1.12 +WEB_SITE="http://www.freedesktop.org/wiki/Software/hal" 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/pkgconfig $fs/usr/lib 1.21 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/hal-extra/receipt Thu May 15 20:48:24 2008 +0200 2.3 @@ -0,0 +1,30 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="hal-extra" 2.7 +VERSION="0.5.11" 2.8 +CATEGORY="x-window" 2.9 +SHORT_DESC="Hal devel files." 2.10 +WANTED="hal" 2.11 +MAINTAINER="pankso@slitaz.org" 2.12 +WEB_SITE="http://www.freedesktop.org/wiki/Software/hal" 2.13 + 2.14 +EXTRA=" 2.15 +hald-addon-cpufreq 2.16 +hald-addon-hid-ups 2.17 +hald-addon-imac-backlight 2.18 +hald-probe-video4linux 2.19 +hald-probe-net-bluetooth 2.20 +hald-probe-ieee1394-unit 2.21 +hald-probe-pc-floppy 2.22 +hald-probe-printer 2.23 +hal-ipw-killswitch-linux" 2.24 + 2.25 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.26 +genpkg_rules() 2.27 +{ 2.28 + mkdir -p $fs/usr/lib/hal 2.29 + for lib in $EXTRA 2.30 + do 2.31 + cp $_pkg/usr/lib/hal/$lib $fs/usr/lib/hal 2.32 + done 2.33 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/hal/receipt Thu May 15 20:48:24 2008 +0200 3.3 @@ -0,0 +1,95 @@ 3.4 +# SliTaz package receipt. 3.5 + 3.6 +PACKAGE="hal" 3.7 +VERSION="0.5.11" 3.8 +CATEGORY="x-window" 3.9 +SHORT_DESC="Hardware Abstraction Layer." 3.10 +DEPENDS="dbus dbus-glib" 3.11 +BUILD_DEPENDS="dbus-dev dbus-glib-dev" 3.12 +MAINTAINER="pankso@slitaz.org" 3.13 +TARBALL="$PACKAGE-$VERSION.tar.gz" 3.14 +WEB_SITE="http://www.freedesktop.org/wiki/Software/hal" 3.15 +WGET_URL="http://hal.freedesktop.org/releases/$TARBALL" 3.16 + 3.17 +EXTRA=" 3.18 +hald-addon-cpufreq 3.19 +hald-addon-hid-ups 3.20 +hald-addon-imac-backlight 3.21 +hald-probe-video4linux 3.22 +hald-probe-net-bluetooth 3.23 +hald-probe-ieee1394-unit 3.24 +hald-probe-pc-floppy 3.25 +hald-probe-printer 3.26 +hal-ipw-killswitch-linux" 3.27 + 3.28 +# Rules to configure and make the package. 3.29 +compile_rules() 3.30 +{ 3.31 + cd $src 3.32 + ./configure \ 3.33 + --prefix=/usr \ 3.34 + --libexecdir=/usr/lib/hal \ 3.35 + --sysconfdir=/etc \ 3.36 + --localstatedir=/var \ 3.37 + --mandir=/usr/share/man \ 3.38 + --disable-usb-ids \ 3.39 + --disable-policy-kit \ 3.40 + $CONFIGURE_ARGS 3.41 + make 3.42 + make DESTDIR=$PWD/_pkg install 3.43 +} 3.44 + 3.45 +# Rules to gen a SliTaz package suitable for Tazpkg. 3.46 +genpkg_rules() 3.47 +{ 3.48 + mkdir -p $fs/usr/lib $fs/usr/share 3.49 + cp -a $_pkg/etc $fs 3.50 + cp -a $_pkg/var $fs 3.51 + cp -a $_pkg/usr/bin $fs/usr 3.52 + cp -a $_pkg/usr/sbin $fs/usr 3.53 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 3.54 + cp -a $_pkg/usr/lib/hal $fs/usr/lib 3.55 + cp -a $_pkg/usr/share/hal $fs/usr/share 3.56 + chmod -R +x $fs/usr/lib/hal/scripts/* 3.57 + 3.58 + # Remove a few run time lib. 3.59 + for lib in $EXTRA 3.60 + do 3.61 + rm $fs/usr/lib/hal/$lib 3.62 + done 3.63 + 3.64 + # Init script 3.65 + cp -a stuff/etc $fs 3.66 + chown -R root.root $fs 3.67 +} 3.68 + 3.69 +pre_install() 3.70 +{ 3.71 + local root 3.72 + root=$1 3.73 + # Go for echoing on configuration files if any haldeamon user 3.74 + # was found. 3.75 + if ! grep -q 'messagebus' $root/etc/passwd; then 3.76 + echo -n "Adding user: messagebus..." 3.77 + echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd 3.78 + echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow 3.79 + echo 'haldaemon:x:26:' >> $root/etc/group 3.80 + echo 'haldaemon:!::' >> $root/etc/gshadow 3.81 + status 3.82 + fi 3.83 + if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then 3.84 + echo -n "Configuring $root/etc/daemons.conf..." 3.85 + cat >> $root/etc/daemons.conf << "EOT" 3.86 +# HAL daemon options. 3.87 +HALD_OPTIONS="--daemon=yes" 3.88 + 3.89 +EOT 3.90 + status 3.91 + fi 3.92 +} 3.93 + 3.94 +pre_remove() 3.95 +{ 3.96 + /etc/init.d/hald stop 3.97 + deluser haldaemon 3.98 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/hal/stuff/etc/init.d/hald Thu May 15 20:48:24 2008 +0200 4.3 @@ -0,0 +1,55 @@ 4.4 +#!/bin/sh 4.5 +# /etc/init.d/hald: Start, stop and restart HAL daemon on SliTaz, 4.6 +# at boot time or with the command line. Daemons options are configured 4.7 +# with /etc/daemons.conf 4.8 +# 4.9 +. /etc/init.d/rc.functions 4.10 +. /etc/daemons.conf 4.11 + 4.12 +NAME=HAL 4.13 +DESC="Hardware Abstraction Layer" 4.14 +DAEMON=/usr/sbin/hald 4.15 +OPTIONS=$HALD_OPTIONS 4.16 +PIDFILE=/var/run/hald/pid 4.17 + 4.18 +case "$1" in 4.19 + start) 4.20 + if [ -f $PIDFILE ] ; then 4.21 + echo "$NAME already running." 4.22 + exit 1 4.23 + fi 4.24 + echo -n "Starting $DESC: $NAME... " 4.25 + $DAEMON $OPTIONS 4.26 + status 4.27 + ;; 4.28 + stop) 4.29 + if [ ! -f $PIDFILE ] ; then 4.30 + echo "$NAME is not running." 4.31 + exit 1 4.32 + fi 4.33 + echo -n "Stopping $DESC: $NAME... " 4.34 + kill `cat $PIDFILE` 4.35 + rm $PIDFILE 4.36 + status 4.37 + ;; 4.38 + restart) 4.39 + if [ ! -f $PIDFILE ] ; then 4.40 + echo "$NAME is not running." 4.41 + exit 1 4.42 + fi 4.43 + echo -n "Restarting $DESC: $NAME... " 4.44 + kill `cat $PIDFILE` 4.45 + rm $PIDFILE 4.46 + sleep 2 4.47 + $DAEMON $OPTIONS 4.48 + status 4.49 + ;; 4.50 + *) 4.51 + echo "" 4.52 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 4.53 + echo "" 4.54 + exit 1 4.55 + ;; 4.56 +esac 4.57 + 4.58 +exit 0