summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-power/acpid')
-rw-r--r--sys-power/acpid/ChangeLog22
-rw-r--r--sys-power/acpid/acpid-1.0.6.ebuild66
-rw-r--r--sys-power/acpid/files/acpid-1.0.6-conf.d6
-rw-r--r--sys-power/acpid/files/acpid-1.0.6-examples.diff116
-rw-r--r--sys-power/acpid/files/acpid-1.0.6-init.d38
-rw-r--r--sys-power/acpid/files/digest-acpid-1.0.63
6 files changed, 250 insertions, 1 deletions
diff --git a/sys-power/acpid/ChangeLog b/sys-power/acpid/ChangeLog
index 675a75ac0063..fcb05aad973d 100644
--- a/sys-power/acpid/ChangeLog
+++ b/sys-power/acpid/ChangeLog
@@ -1,6 +1,26 @@
# ChangeLog for sys-power/acpid
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.28 2007/05/12 01:40:05 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.29 2007/07/17 19:42:55 genstef Exp $
+
+*acpid-1.0.6 (17 Jul 2007)
+
+ 17 Jul 2007; Stefan Schweizer <genstef@gentoo.org>
+ +files/acpid-1.0.6-conf.d, +files/acpid-1.0.6-examples.diff,
+ +files/acpid-1.0.6-init.d, +acpid-1.0.6.ebuild:
+ version bump, thanks go to Matej Laitl <strohel@gmail.com> in bug 185553,
+ also thanks for his excellent changelog:
+ * dropped debian patch from SRC_URI, we'll provide light version of that patch
+ * changed KEYWORDS to testing
+ * patch with our own patch, which is an extract from the big debian patch for
+ 1.0.4 (all source code changes are ignored, not needed for 1.0.6)
+ * dodir /usr/bin is not needed as acpid Makefile has been fixed
+ * we install sample conf.d file. (this file was already in portage tree but not
+ used in any recent ebuild)
+ * add elog comment about changed logging system
+ * kill doc useflag was not used in ebuild anyway. (this also applies to in-tree
+ 1.0.4-r5 ebuild AFAIK)
+ * kill logrotate useflag and modify patch not to ship logrotate file. It had no
+ sense when acpid logs to syslog.
12 May 2007; Daniel Gryniewicz <dang@gentoo.org> acpid-1.0.4-r5.ebuild:
Marked stable on amd64 for bug #126131
diff --git a/sys-power/acpid/acpid-1.0.6.ebuild b/sys-power/acpid/acpid-1.0.6.ebuild
new file mode 100644
index 000000000000..2fefc12290b6
--- /dev/null
+++ b/sys-power/acpid/acpid-1.0.6.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/acpid-1.0.6.ebuild,v 1.1 2007/07/17 19:42:55 genstef Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="http://acpid.sourceforge.net"
+SRC_URI="mirror://sourceforge/acpid/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 -ppc ~x86"
+IUSE=""
+
+DEPEND="sys-apps/sed"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+
+ epatch ${FILESDIR}/${P}-examples.diff
+}
+
+src_compile() {
+ # DO NOT COMPILE WITH OPTIMISATIONS (bug #22365)
+ # That is a note to the devs. IF you are a user, go ahead and optimise
+ # if you want, but we won't support bugs associated with that.
+ emake CC="$(tc-getCC)" INSTPREFIX="${D}" || die "emake failed"
+}
+
+src_install() {
+ emake INSTPREFIX="${D}" install || die "emake install failed"
+
+ exeinto /etc/acpi
+ doexe examples/default.sh
+ insinto /etc/acpi/events
+ doins examples/default
+
+ dodoc README Changelog TODO
+
+ newinitd ${FILESDIR}/${P}-init.d acpid
+ newconfd ${FILESDIR}/${P}-conf.d acpid
+
+ docinto examples
+ dodoc samples/{acpi_handler.sh,sample.conf}
+ dodoc examples/ac{,.sh}
+
+ docinto examples/battery
+ dodoc samples/battery/*
+
+ docinto examples/panasonic
+ dodoc samples/panasonic/*
+}
+
+pkg_postinst() {
+ echo
+ einfo "You may wish to read the Gentoo Linux Power Management Guide,"
+ einfo "which can be found online at:"
+ einfo " http://www.gentoo.org/doc/en/power-management-guide.xml"
+ echo
+ elog "As of version 1.0.6, acpid uses system log facility instead of custom log"
+ elog "file. This means acpid messages will be usually located in "
+ elog "/var/log/messages (and not in /var/log/acpid) for common setups."
+ echo
+}
diff --git a/sys-power/acpid/files/acpid-1.0.6-conf.d b/sys-power/acpid/files/acpid-1.0.6-conf.d
new file mode 100644
index 000000000000..30329760fc14
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.6-conf.d
@@ -0,0 +1,6 @@
+# /etc/conf.d/acpid: config file for /etc/init.d/acpid
+
+# Options to pass to the acpid daemon.
+# See the acpid(8) man page for more info.
+
+ACPID_OPTIONS=""
diff --git a/sys-power/acpid/files/acpid-1.0.6-examples.diff b/sys-power/acpid/files/acpid-1.0.6-examples.diff
new file mode 100644
index 000000000000..5a8e21ff3603
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.6-examples.diff
@@ -0,0 +1,116 @@
+diff -Nur acpid-1.0.6.orig/examples/ac acpid-1.0.6/examples/ac
+--- acpid-1.0.6.orig/examples/ac 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.6/examples/ac 2007-07-16 19:37:35.000000000 +0200
+@@ -0,0 +1,11 @@
++# /etc/acpid/events/ac
++# This detects changes to AC power status, and passes them to
++# /etc/acpi/ac.sh for further processing.
++
++# Optionally you can specify the placeholder %e. It will pass
++# through the whole kernel event message to the program you've
++# specified.
++
++event=ac_adapter
++action=/etc/acpi/ac.sh
++
+diff -Nur acpid-1.0.6.orig/examples/ac.sh acpid-1.0.6/examples/ac.sh
+--- acpid-1.0.6.orig/examples/ac.sh 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.6/examples/ac.sh 2007-07-16 19:37:35.000000000 +0200
+@@ -0,0 +1,39 @@
++#!/bin/sh
++# /etc/acpid/ac.sh
++# Detect loss of AC power and regaining of AC power, and take action
++# appropriatly.
++
++# On my laptop anyway, this script doesn't not get different parameters for
++# loss of power and regained power. So, I have to use a separate program to
++# tell what the adapter status is.
++
++# This uses the spicctrl program for probing the sonypi device.
++BACKLIGHT=$(spicctrl -B)
++
++if on_ac_power; then
++ # Now on AC power.
++
++ # Tell longrun to go crazy.
++ longrun -f performance
++ longrun -s 0 100
++
++ # Turn up the backlight unless it's up far enough.
++ if [ "$BACKLIGHT" -lt 108 ]; then
++ spicctrl -b 108
++ fi
++else
++ # Now off AC power.
++
++ # Tell longrun to be a miser.
++ longrun -f economy
++ longrun -s 0 50 # adjust to suite..
++
++ # Don't allow the screen to be too bright, but don't turn the
++ # backlight _up_ on removal, and don't turn it all the way down, as
++ # that is unusable on my laptop in most conditions. Adjust to
++ # taste.
++ if [ "$BACKLIGHT" -gt 68 ]; then
++ spicctrl -b 68
++ fi
++fi
++
+diff -Nur acpid-1.0.6.orig/examples/default acpid-1.0.6/examples/default
+--- acpid-1.0.6.orig/examples/default 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.6/examples/default 2007-07-16 19:37:35.000000000 +0200
+@@ -0,0 +1,18 @@
++# This is the ACPID default configuration, it takes all
++# events and passes them to /etc/acpi/default.sh for further
++# processing.
++
++# event keeps a regular expression matching the event. To get
++# power events only, just use something like "event=button power.*"
++# to catch it.
++# action keeps the command to be executed after an event occurs
++# In case of the power event above, your entry may look this way:
++#event=button power.*
++#action=/sbin/init 0
++
++# Optionally you can specify the placeholder %e. It will pass
++# through the whole kernel event message to the program you've
++# specified.
++
++event=.*
++action=/etc/acpi/default.sh %e
+diff -Nur acpid-1.0.6.orig/examples/default.sh acpid-1.0.6/examples/default.sh
+--- acpid-1.0.6.orig/examples/default.sh 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.6/examples/default.sh 2007-07-16 19:37:35.000000000 +0200
+@@ -0,0 +1,32 @@
++#!/bin/sh
++# Default acpi script that takes an entry for all actions
++
++set $*
++
++# Take care about the way events are reported
++ev_type=`echo "$1" | cut -d/ -f1`
++if [ "$ev_type" = "$1" ]; then
++ event="$2";
++else
++ event=`echo "$1" | cut -d/ -f2`
++fi
++
++
++case "$ev_type" in
++ button)
++ case "$event" in
++ power)
++ logger "acpid: received a shutdown request"
++ /sbin/init 0
++ break
++ ;;
++ *)
++ logger "acpid: action $2 is not defined"
++ ;;
++ esac
++ ;;
++
++ *)
++ logger "ACPI group $1 / action $2 is not defined"
++ ;;
++esac
diff --git a/sys-power/acpid/files/acpid-1.0.6-init.d b/sys-power/acpid/files/acpid-1.0.6-init.d
new file mode 100644
index 000000000000..41819ebd86e3
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.6-init.d
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-1.0.6-init.d,v 1.1 2007/07/17 19:42:55 genstef Exp $
+
+opts="reload"
+
+depend() {
+ need localmount
+ use logger
+}
+
+checkconfig() {
+ if [ ! -e /proc/acpi ] ; then
+ eerror "ACPI support has not been compiled into the kernel"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting acpid"
+ start-stop-daemon --start --exec /usr/sbin/acpid -- ${ACPID_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping acpid"
+ start-stop-daemon --stop --exec /usr/sbin/acpid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading acpid configuration"
+ start-stop-daemon --stop --oknodo --exec /usr/sbin/acpid --signal HUP
+ eend $?
+}
diff --git a/sys-power/acpid/files/digest-acpid-1.0.6 b/sys-power/acpid/files/digest-acpid-1.0.6
new file mode 100644
index 000000000000..1c7351ba6139
--- /dev/null
+++ b/sys-power/acpid/files/digest-acpid-1.0.6
@@ -0,0 +1,3 @@
+MD5 5c9b705700df51d232be223b6ab6414d acpid-1.0.6.tar.gz 24226
+RMD160 6abb7bae419d30b1f9f772d42fab9991771d5b13 acpid-1.0.6.tar.gz 24226
+SHA256 aa3c42224ec702b6cdb69ca6501284cb6dacb87473a076d7337ee9635c96f160 acpid-1.0.6.tar.gz 24226