summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
Diffstat (limited to 'abs')
-rw-r--r--abs/core/acpid/PKGBUILD38
-rw-r--r--abs/core/acpid/__changelog5
-rw-r--r--abs/core/acpid/acpid.conf5
-rw-r--r--abs/core/acpid/acpid.rc40
-rw-r--r--abs/core/acpid/acpid.service3
-rw-r--r--abs/core/acpid/acpid.socket2
-rwxr-xr-x[-rw-r--r--]abs/core/acpid/handler.sh21
-rw-r--r--abs/core/acpid/handler.sh.runit68
8 files changed, 28 insertions, 154 deletions
diff --git a/abs/core/acpid/PKGBUILD b/abs/core/acpid/PKGBUILD
index a4d931a..8cd7875 100644
--- a/abs/core/acpid/PKGBUILD
+++ b/abs/core/acpid/PKGBUILD
@@ -1,38 +1,29 @@
-# $Id: PKGBUILD 71877 2012-06-02 17:57:44Z seblu $
-# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# $Id: PKGBUILD 97250 2013-09-15 20:35:17Z seblu $
+# Maintainer: Sébastien Luttringer
# Contributor: xduugu
# Contributor: Manolis Tzanidakis
# Contributor: Jonathan Schmidt <j.schmidt@archlinux.us
pkgname=acpid
-pkgver=2.0.16
-pkgrel=3
+pkgver=2.0.20
+pkgrel=1
pkgdesc='A daemon for delivering ACPI power management events with netlink support'
arch=('i686' 'x86_64')
-url='http://tedfelix.com/linux/acpid-netlink.html'
+url='http://sourceforge.net/projects/acpid2/'
license=('GPL')
depends=('bash')
optdepends=('perl: use perl based examples')
replaces=('acpid2')
-backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything' 'etc/conf.d/acpid')
-source=("http://www.tedfelix.com/linux/$pkgname-$pkgver.tar.xz"
- 'acpid.rc'
- 'acpid.conf'
+backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything')
+source=("http://downloads.sourceforge.net/sourceforge/acpid2/$pkgname-$pkgver.tar.xz"
'acpid.socket'
'acpid.service'
'anything'
'handler.sh')
-md5sums=('d59fc02c9c34f0d5c137495302e2c074'
- '077475c75fbdd9de75f9a397130ccd91'
- '929c6d2e91295c22ed9ec6212d7eabef'
- 'ee6cb99e50e580c50331a73045412ae9'
- '7f545754db5be7296d2dd97c049062ee'
- '2d37b98d6e74bab815604b8b48c6cfd4'
- '74ee3c33714ff5cb44f30c9a0dceeef0')
build() {
cd $pkgname-$pkgver
- ./configure --prefix=/usr
+ ./configure --prefix=/usr --sbindir=/usr/bin
make
}
@@ -45,14 +36,17 @@ package() {
install -Dm644 anything "$pkgdir/etc/acpi/events/anything"
install -Dm755 handler.sh "$pkgdir/etc/acpi/handler.sh"
- # initscripts
- install -Dm755 acpid.rc "$pkgdir/etc/rc.d/acpid"
- install -Dm644 acpid.conf "$pkgdir/etc/conf.d/acpid"
+ # systemd
install -Dm644 acpid.socket "$pkgdir/usr/lib/systemd/system/acpid.socket"
install -Dm644 acpid.service "$pkgdir/usr/lib/systemd/system/acpid.service"
# fix acpid rights
- chmod 755 "$pkgdir/usr/sbin/acpid"
+ chmod 755 "$pkgdir/usr/bin/acpid"
}
-# vim:set ts=2 sw=2 ft=sh et:
+# vim:set ts=2 sw=2 et:
+md5sums=('1b740e6419cf45aaeb2bd78d589f27f9'
+ 'd11700eb136e0489835ddaf977a7905b'
+ '79cc7a9dceacdeffd51f070c2ba5f023'
+ '2d37b98d6e74bab815604b8b48c6cfd4'
+ 'e97277eb1937c7ffe92a95fa60c073e4')
diff --git a/abs/core/acpid/__changelog b/abs/core/acpid/__changelog
index 9802b2b..f5b621c 100644
--- a/abs/core/acpid/__changelog
+++ b/abs/core/acpid/__changelog
@@ -1,2 +1,3 @@
-Modify handler.sh to use runit-init.
-update to 1.0.10 and change handler.sh to handler.sh.runit
+Added this to PBTN in handler
+/usr/bin/runit-init 0
+/usr/bin/poweroff
diff --git a/abs/core/acpid/acpid.conf b/abs/core/acpid/acpid.conf
deleted file mode 100644
index b60103a..0000000
--- a/abs/core/acpid/acpid.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Arguments to be passed to the acpid daemon
-#
-
-ACPID_ARGS=""
diff --git a/abs/core/acpid/acpid.rc b/abs/core/acpid/acpid.rc
deleted file mode 100644
index 674f462..0000000
--- a/abs/core/acpid/acpid.rc
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-[[ -f /etc/conf.d/acpid ]] && . /etc/conf.d/acpid
-
-PID=$(pidof -o %PPID /usr/sbin/acpid)
-case "$1" in
- start)
- stat_busy "Starting acpid"
- [ -z "$PID" ] && /usr/sbin/acpid $ACPID_ARGS
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon acpid
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping acpid"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon acpid
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
-# vim:set ts=2 sw=2 ft=sh et:
diff --git a/abs/core/acpid/acpid.service b/abs/core/acpid/acpid.service
index 4c0e073..022f72a 100644
--- a/abs/core/acpid/acpid.service
+++ b/abs/core/acpid/acpid.service
@@ -3,8 +3,7 @@ Description=ACPI event daemon
Requires=acpid.socket
[Service]
-EnvironmentFile=/etc/conf.d/acpid
-ExecStart=/usr/sbin/acpid -f $ACPID_ARGS
+ExecStart=/usr/bin/acpid -f
[Install]
WantedBy=multi-user.target
diff --git a/abs/core/acpid/acpid.socket b/abs/core/acpid/acpid.socket
index 1e5365b..1b23f87 100644
--- a/abs/core/acpid/acpid.socket
+++ b/abs/core/acpid/acpid.socket
@@ -2,7 +2,7 @@
Description=ACPID Listen Socket
[Socket]
-ListenStream=/run/acpid.socket
+ListenStream=/var/run/acpid.socket
[Install]
WantedBy=sockets.target
diff --git a/abs/core/acpid/handler.sh b/abs/core/acpid/handler.sh
index b5a548f..206d656 100644..100755
--- a/abs/core/acpid/handler.sh
+++ b/abs/core/acpid/handler.sh
@@ -1,18 +1,13 @@
-#!/bin/sh
+#!/bin/bash
# Default acpi script that takes an entry for all actions
-minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
-maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
-setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
-
-set $*
-
case "$1" in
button/power)
case "$2" in
PBTN|PWRF)
- logger "PowerButton pressed: $2"
- poweroff
+ logger 'PowerButton pressed'
+ /usr/bin/runit-init 0
+ /usr/bin/poweroff
;;
*)
logger "ACPI action undefined: $2"
@@ -22,7 +17,7 @@ case "$1" in
button/sleep)
case "$2" in
SLPB|SBTN)
- echo -n mem >/sys/power/state
+ logger 'SleepButton pressed'
;;
*)
logger "ACPI action undefined: $2"
@@ -34,12 +29,10 @@ case "$1" in
AC|ACAD|ADP0)
case "$4" in
00000000)
- echo -n $minspeed >$setspeed
- #/etc/laptop-mode/laptop-mode start
+ logger 'AC unpluged'
;;
00000001)
- echo -n $maxspeed >$setspeed
- #/etc/laptop-mode/laptop-mode stop
+ logger 'AC pluged'
;;
esac
;;
diff --git a/abs/core/acpid/handler.sh.runit b/abs/core/acpid/handler.sh.runit
deleted file mode 100644
index 9fb2593..0000000
--- a/abs/core/acpid/handler.sh.runit
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-# Default acpi script that takes an entry for all actions
-
-# NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
-# modify it to not use /sys
-
-minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
-maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
-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"
- /sbin/runit-init 0
- /sbin/poweroff
- ;;
- *) 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