summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/acpid
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/acpid')
-rw-r--r--abs/core-testing/acpid/PKGBUILD53
-rwxr-xr-xabs/core-testing/acpid/handler.sh106
2 files changed, 81 insertions, 78 deletions
diff --git a/abs/core-testing/acpid/PKGBUILD b/abs/core-testing/acpid/PKGBUILD
index f39bbc1..4fbbdf2 100644
--- a/abs/core-testing/acpid/PKGBUILD
+++ b/abs/core-testing/acpid/PKGBUILD
@@ -1,31 +1,38 @@
+# $Id: PKGBUILD 20369 2008-12-03 02:03:14Z thayer $
+# Contributor: Manolis Tzanidakis
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+# Maintainer: Thayer Williams <thayer@archlinux.org>
pkgname=acpid
-pkgver=1.0.6
-pkgrel=3
-arch=('i686')
-pkgdesc="Utilities for using ACPI power management"
+pkgver=1.0.8
+pkgrel=1
+pkgdesc="A daemon for delivering ACPI power management events"
url="http://acpid.sourceforge.net"
+license=('GPL2')
+arch=('i686' 'x86_64')
depends=(glibc)
-source=(http://easynews.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
- acpid-1.0.4-gcc4.patch
- acpid
- anything
- handler.sh
- Makefile )
+source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+ acpid
+ anything
+ handler.sh)
backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything')
-#options='-D_GNU_SOURCE'
-MAKEFLAGS="-j2"
+md5sums=('1d9c52fe2c0b51f8463f357c2a3d3ddb'
+ '15903690f1bae4b3b0625b369de65521'
+ '2d37b98d6e74bab815604b8b48c6cfd4'
+ '0e8dd13793b1baa79a745f4034888367')
build() {
- cd $startdir/src/$pkgname-$pkgver
- # patch -Np1 -i ${startdir}/src/acpid-1.0.4-gcc4.patch || return 1
- cp ../Makefile .
- /usr/bin/make || return 1
- /bin/install -d -m0755 $startdir/pkg/usr/bin
- /usr/bin/make INSTPREFIX=$startdir/pkg \
- MAN8DIR=$startdir/pkg/usr/man/man8 install
- /bin/install -D -m0755 ../acpid $startdir/pkg/etc/rc.d/acpid
- /bin/install -d -m0755 $startdir/pkg/etc/acpi/events
- /bin/install -D -m0644 ../anything $startdir/pkg/etc/acpi/events/anything
- /bin/install -D -m0755 ../handler.sh $startdir/pkg/etc/acpi/handler.sh
+ cd $srcdir/$pkgname-$pkgver
+ /usr/bin/make || return 1
+ /bin/install -d -m0755 $pkgdir/usr/bin || return 1
+ /usr/bin/make INSTPREFIX=$pkgdir \
+ MAN8DIR=$pkgdir/usr/share/man/man8 install || return 1
+
+ # install our supplementary scripts
+ /bin/install -D -m0755 $srcdir/acpid $pkgdir/etc/rc.d/acpid || return 1
+ /bin/install -D -m0644 $srcdir/anything $pkgdir/etc/acpi/events/anything || return 1
+ /bin/install -D -m0755 $srcdir/handler.sh $pkgdir/etc/acpi/handler.sh || return 1
+
+ # set world readable bit on the acpid binary
+ /bin/chmod 755 $pkgdir/usr/sbin/acpid || return 1
}
diff --git a/abs/core-testing/acpid/handler.sh b/abs/core-testing/acpid/handler.sh
index b885f77..ad31d1a 100755
--- a/abs/core-testing/acpid/handler.sh
+++ b/abs/core-testing/acpid/handler.sh
@@ -11,59 +11,55 @@ setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
set $*
case "$1" in
- button/power)
- #echo "PowerButton pressed!">/dev/tty5
- case "$2" in
- PWRF) logger "PowerButton pressed: $2"
- xsay "Please wait while the system powers off" &
- /sbin/halt-runit
- ;;
- *) logger "ACPI action undefined: $2" ;;
- esac
- ;;
- button/sleep)
- case "$2" in
- SLPB) echo -n mem >/sys/power/state ;;
- *) logger "ACPI action undefined: $2" ;;
- esac
- ;;
- ac_adapter)
- case "$2" in
- AC)
- case "$4" in
- 00000000)
- echo -n $minspeed >$setspeed
- #/etc/laptop-mode/laptop-mode start
- ;;
- 00000001)
- echo -n $maxspeed >$setspeed
- #/etc/laptop-mode/laptop-mode stop
- ;;
- esac
- ;;
- *) logger "ACPI action undefined: $2" ;;
- esac
- ;;
- battery)
- case "$2" in
- BAT0)
- case "$4" in
- 00000000) #echo "offline" >/dev/tty5
- ;;
- 00000001) #echo "online" >/dev/tty5
- ;;
- esac
- ;;
- CPU0)
- ;;
- *) logger "ACPI action undefined: $2" ;;
- esac
- ;;
-
- button/lid)
- #echo "LID switched!">/dev/tty5
- ;;
- *)
- logger "ACPI group/action undefined: $1 / $2"
- ;;
+ button/power)
+ #echo "PowerButton pressed!">/dev/tty5
+ case "$2" in
+ PWRF) logger "PowerButton pressed: $2" ;;
+ *) logger "ACPI action undefined: $2" ;;
+ esac
+ ;;
+ button/sleep)
+ case "$2" in
+ SLPB) echo -n mem >/sys/power/state ;;
+ *) logger "ACPI action undefined: $2" ;;
+ esac
+ ;;
+ ac_adapter)
+ case "$2" in
+ AC)
+ case "$4" in
+ 00000000)
+ echo -n $minspeed >$setspeed
+ #/etc/laptop-mode/laptop-mode start
+ ;;
+ 00000001)
+ echo -n $maxspeed >$setspeed
+ #/etc/laptop-mode/laptop-mode stop
+ ;;
+ esac
+ ;;
+ *) logger "ACPI action undefined: $2" ;;
+ esac
+ ;;
+ battery)
+ case "$2" in
+ BAT0)
+ case "$4" in
+ 00000000) #echo "offline" >/dev/tty5
+ ;;
+ 00000001) #echo "online" >/dev/tty5
+ ;;
+ esac
+ ;;
+ CPU0)
+ ;;
+ *) logger "ACPI action undefined: $2" ;;
+ esac
+ ;;
+ button/lid)
+ #echo "LID switched!">/dev/tty5
+ ;;
+ *)
+ logger "ACPI group/action undefined: $1 / $2"
+ ;;
esac