wok-6.x rev 10961

Add:laptop-mode-tools,util-linux-ng-blockdev
author Liu Peng <hipeng@yahoo.com>
date Tue Sep 20 20:44:27 2011 +0800 (2011-09-20)
parents 6e4cd2532814
children 3af70ef3a7ac
files laptop-mode-tools/receipt laptop-mode-tools/stuff/laptop-mode.sh util-linux-ng-blockdev/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/laptop-mode-tools/receipt	Tue Sep 20 20:44:27 2011 +0800
     1.3 @@ -0,0 +1,33 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="laptop-mode-tools"
     1.7 +VERSION="1.59"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Laptop ACPI tools"
    1.10 +MAINTAINER="liupeng <hipeng@yahoo.com>"
    1.11 +DEPENDS="acpid hdparm util-linux-ng-flock util-linux-ng-blockdev"
    1.12 +TARBALL="${PACKAGE}_$VERSION.tar.gz"
    1.13 +WEB_SITE="http://samwel.tk/laptop_mode/"
    1.14 +WGET_URL="http://samwel.tk/laptop_mode/tools/downloads/$TARBALL"
    1.15 +
    1.16 +# Rules to configure and make the package.
    1.17 +compile_rules()
    1.18 +{
    1.19 +	cd ${PACKAGE}-$VERSION
    1.20 +	make DESTDIR=$PWD/_pkg INIT_D=none install
    1.21 +}
    1.22 +
    1.23 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.24 +genpkg_rules()
    1.25 +{
    1.26 +	mkdir -p $fs/usr/sbin/ $fs/etc/init.d/ $fs/lib
    1.27 +	cp -a $_pkg/usr/sbin/laptop_mode $fs/usr/sbin/
    1.28 +	cp -a ./stuff/laptop-mode.sh $fs/etc/init.d/
    1.29 +	cp -a $_pkg/etc/acpi $fs/etc/
    1.30 +	cp -a $_pkg/etc/laptop-mode $fs/etc/
    1.31 +	cp -a $_pkg/etc/power $fs/etc/
    1.32 +	cp -a $_pkg/etc/udev $fs/etc/
    1.33 +	cp -a $_pkg/lib/udev $fs/lib/
    1.34 +	cp -a $_pkg/usr/lib/ $fs/usr/
    1.35 +}
    1.36 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/laptop-mode-tools/stuff/laptop-mode.sh	Tue Sep 20 20:44:27 2011 +0800
     2.3 @@ -0,0 +1,26 @@
     2.4 +#!/bin/sh
     2.5 +#
     2.6 +# /etc/rc.d/laptop-mode: start/stop laptop-mode
     2.7 +#
     2.8 +
     2.9 +case $1 in
    2.10 +start)
    2.11 +        [ ! -d /var/run/laptop-mode-tools ] && install -d /var/run/laptop-mode-tools
    2.12 +        touch /var/run/laptop-mode-tools/enabled
    2.13 +        /usr/sbin/laptop_mode auto init >/dev/null 2>&1
    2.14 +        ;;
    2.15 +stop)
    2.16 +        rm -f /var/run/laptop-mode-tools/enabled
    2.17 +        ;;
    2.18 +restart)
    2.19 +        /usr/sbin/laptop_mode auto init force >/dev/null 2>&1
    2.20 +        ;;
    2.21 +status)
    2.22 +        /usr/sbin/laptop_mode status
    2.23 +        ;;
    2.24 +*)
    2.25 +        echo "usage: $0 [start|stop|restart|status]"
    2.26 +        ;;
    2.27 +esac
    2.28 +
    2.29 +# End of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/util-linux-ng-blockdev/receipt	Tue Sep 20 20:44:27 2011 +0800
     3.3 @@ -0,0 +1,28 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="util-linux-ng-blockdev"
     3.7 +VERSION="2.19.1"
     3.8 +CATEGORY="base-system"
     3.9 +SHORT_DESC="The blockdev utility from Util linux NG."
    3.10 +MAINTAINER="devel@slitaz.org"
    3.11 +DEPENDS="glibc-base"
    3.12 +WANTED="util-linux-ng"
    3.13 +WEB_SITE="http://kernel.org/~kzak/util-linux-ng/"
    3.14 +
    3.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.16 +genpkg_rules()
    3.17 +{
    3.18 +	mkdir -p $fs/sbin
    3.19 +	cp -a $_pkg/sbin/blockdev $fs/sbin
    3.20 +}
    3.21 +
    3.22 +# Overlap busybox
    3.23 +pre_install()
    3.24 +{
    3.25 +	rm -f $1/sbin/blockdev
    3.26 +}
    3.27 +
    3.28 +post_remove()
    3.29 +{
    3.30 +	ln -s /bin/busybox /sbin/blockdev
    3.31 +}