summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-power/acpid')
-rw-r--r--sys-power/acpid/Manifest4
-rw-r--r--sys-power/acpid/acpid-2.0.20.ebuild61
-rw-r--r--sys-power/acpid/acpid-2.0.21.ebuild61
-rw-r--r--sys-power/acpid/acpid-2.0.22.ebuild68
-rw-r--r--sys-power/acpid/acpid-2.0.23.ebuild68
-rw-r--r--sys-power/acpid/files/acpid-1.0.4-default19
-rwxr-xr-xsys-power/acpid/files/acpid-1.0.6-default.sh59
-rw-r--r--sys-power/acpid/files/acpid-2.0.16-conf.d6
-rw-r--r--sys-power/acpid/files/acpid-2.0.16-init.d21
-rw-r--r--sys-power/acpid/files/systemd/acpid.service10
-rw-r--r--sys-power/acpid/files/systemd/acpid.socket8
-rw-r--r--sys-power/acpid/metadata.xml11
12 files changed, 396 insertions, 0 deletions
diff --git a/sys-power/acpid/Manifest b/sys-power/acpid/Manifest
new file mode 100644
index 000000000000..937904dea199
--- /dev/null
+++ b/sys-power/acpid/Manifest
@@ -0,0 +1,4 @@
+DIST acpid-2.0.20.tar.xz 151380 SHA256 6a1ebaf52c6bef0f3d6da24a364e5f9401004d60ef4f42ec2a23057799fcf750 SHA512 f1c1a91cd5db45c1da6b3f698671bb55b629eb149e09a680cc061a7cf921499f8486ce471d4789dd98f548247ecf1afffc0127fdfb120b3d3adfe0cfa35d172b WHIRLPOOL b22e1578b337e69e6ebbecd3a5e9fdcef9ba0a87e3364e23545f9db2a91bf77a40e70f8e772f85dbdda574c06efdf65848ca7dc75bb773f410a679c73fea4f9e
+DIST acpid-2.0.21.tar.xz 152968 SHA256 c4e67e59888ccb43e6b8f01efb794945356aecdff86155c6a5b0f371d1ff636f SHA512 c449a234f04e8d2e1c7a3eac7e36c020c829e5cd00de3e8716c7645c7e53d8fd4d430f862cb320ed536918fff190b6582f932feff315b0cb117ef89d9fec274e WHIRLPOOL b7162e6f6d00cb2495bb61112e26cfd2c0c27567f35d6329b9f4c953ad74b189ba0141253517b24af447ef3b4352ab00cfeb067e2f779694397d0788bd1edc3f
+DIST acpid-2.0.22.tar.xz 153596 SHA256 3d11454f4283c8f771d8dbd5eb6b5f2bbd9d94d9f77d68bab89e35d98b67ab31 SHA512 ed52d80a17bca082cfe8d14acd4e9f736337f43c3c5c1e90b9fd5c4e8bfc2525dd0992d47230f0cae65e0eac1b2454adb350024f2955e82ffa7125e6eabf4f6a WHIRLPOOL 18acb58b2f454ed15fb024005e2bbb42550b9c283c1a1514cd08c2db8d2daccab2509871c956ea0f528519aa8896748119cc7a972c3d1216600f3fa8353761ac
+DIST acpid-2.0.23.tar.xz 154504 SHA256 4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee SHA512 b2f01f04a9c5370608016c16ecfbc5b503170c2686e6557ab1463e25d56a3ef1d2093d4701205ec1261564b1073653b404d0ae278c0bd8c8496606be1785963f WHIRLPOOL b9c7d4d64e663ffb9c58d2129b4f599453b4da0111b244269cf89ca50cc2de7ecdbea361825724963ee0b93294cadde12dee06c4816f5b709a23e7d443df0afd
diff --git a/sys-power/acpid/acpid-2.0.20.ebuild b/sys-power/acpid/acpid-2.0.20.ebuild
new file mode 100644
index 000000000000..c67a5735d28a
--- /dev/null
+++ b/sys-power/acpid/acpid-2.0.20.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit systemd
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="http://sourceforge.net/projects/acpid2"
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ia64 x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-apm )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3"
+
+src_configure() {
+ econf --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newdoc kacpimon/README README.kacpimon
+ dodoc -r samples
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
+
+ exeinto /etc/acpi
+ newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
+ exeinto /etc/acpi/actions
+ newexe samples/powerbtn/powerbtn.sh powerbtn.sh
+ insinto /etc/acpi/events
+ newins "${FILESDIR}"/${PN}-1.0.4-default default
+
+ newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may wish to read the Gentoo Linux Power Management Guide,"
+ elog "which can be found online at:"
+ elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
+ elog
+ fi
+
+ # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
+ mkdir -p "${ROOT}"/run
+
+ if ! grep -qs "^tmpfs.*/run " "${ROOT}"/proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+}
diff --git a/sys-power/acpid/acpid-2.0.21.ebuild b/sys-power/acpid/acpid-2.0.21.ebuild
new file mode 100644
index 000000000000..244e0f1e53d7
--- /dev/null
+++ b/sys-power/acpid/acpid-2.0.21.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit systemd
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="http://sourceforge.net/projects/acpid2"
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-apm )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3"
+
+src_configure() {
+ econf --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newdoc kacpimon/README README.kacpimon
+ dodoc -r samples
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
+
+ exeinto /etc/acpi
+ newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
+ exeinto /etc/acpi/actions
+ newexe samples/powerbtn/powerbtn.sh powerbtn.sh
+ insinto /etc/acpi/events
+ newins "${FILESDIR}"/${PN}-1.0.4-default default
+
+ newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may wish to read the Gentoo Linux Power Management Guide,"
+ elog "which can be found online at:"
+ elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
+ elog
+ fi
+
+ # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
+ mkdir -p "${ROOT}"/run
+
+ if ! grep -qs "^tmpfs.*/run " "${ROOT}"/proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+}
diff --git a/sys-power/acpid/acpid-2.0.22.ebuild b/sys-power/acpid/acpid-2.0.22.ebuild
new file mode 100644
index 000000000000..9e1df318feff
--- /dev/null
+++ b/sys-power/acpid/acpid-2.0.22.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-info systemd
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="http://sourceforge.net/projects/acpid2"
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-apm )"
+DEPEND=">=sys-kernel/linux-headers-3"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~INPUT_EVDEV"
+ local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support."
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+pkg_setup() { :; }
+
+src_configure() {
+ econf --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newdoc kacpimon/README README.kacpimon
+ dodoc -r samples
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
+
+ exeinto /etc/acpi
+ newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
+ exeinto /etc/acpi/actions
+ newexe samples/powerbtn/powerbtn.sh powerbtn.sh
+ insinto /etc/acpi/events
+ newins "${FILESDIR}"/${PN}-1.0.4-default default
+
+ newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may wish to read the Gentoo Linux Power Management Guide,"
+ elog "which can be found online at:"
+ elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
+ elog
+ fi
+
+ # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
+ mkdir -p "${ROOT%/}"/run
+
+ if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+}
diff --git a/sys-power/acpid/acpid-2.0.23.ebuild b/sys-power/acpid/acpid-2.0.23.ebuild
new file mode 100644
index 000000000000..777d679c8791
--- /dev/null
+++ b/sys-power/acpid/acpid-2.0.23.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-info systemd
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="http://sourceforge.net/projects/acpid2"
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ia64 x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-apm )"
+DEPEND=">=sys-kernel/linux-headers-3"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~INPUT_EVDEV"
+ local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support."
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+pkg_setup() { :; }
+
+src_configure() {
+ econf --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newdoc kacpimon/README README.kacpimon
+ dodoc -r samples
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
+
+ exeinto /etc/acpi
+ newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
+ exeinto /etc/acpi/actions
+ newexe samples/powerbtn/powerbtn.sh powerbtn.sh
+ insinto /etc/acpi/events
+ newins "${FILESDIR}"/${PN}-1.0.4-default default
+
+ newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may wish to read the Gentoo Linux Power Management Guide,"
+ elog "which can be found online at:"
+ elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
+ elog
+ fi
+
+ # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
+ mkdir -p "${ROOT%/}"/run
+
+ if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+}
diff --git a/sys-power/acpid/files/acpid-1.0.4-default b/sys-power/acpid/files/acpid-1.0.4-default
new file mode 100644
index 000000000000..a07c1827f4e9
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.4-default
@@ -0,0 +1,19 @@
+# /etc/acpi/events/default
+# 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 --git a/sys-power/acpid/files/acpid-1.0.6-default.sh b/sys-power/acpid/files/acpid-1.0.6-default.sh
new file mode 100755
index 000000000000..8be6f3e1a9f4
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.6-default.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+# /etc/acpi/default.sh
+# Default acpi script that takes an entry for all actions
+
+set $*
+
+group=${1%%/*}
+action=${1#*/}
+device=$2
+id=$3
+value=$4
+
+log_unhandled() {
+ logger "ACPI event unhandled: $*"
+}
+
+case "$group" in
+ button)
+ case "$action" in
+ power)
+ /etc/acpi/actions/powerbtn.sh
+ ;;
+
+ # if your laptop doesnt turn on/off the display via hardware
+ # switch and instead just generates an acpi event, you can force
+ # X to turn off the display via dpms. note you will have to run
+ # 'xhost +local:0' so root can access the X DISPLAY.
+ #lid)
+ # xset dpms force off
+ # ;;
+
+ *) log_unhandled $* ;;
+ esac
+ ;;
+
+ ac_adapter)
+ case "$value" in
+ # Add code here to handle when the system is unplugged
+ # (maybe change cpu scaling to powersave mode). For
+ # multicore systems, make sure you set powersave mode
+ # for each core!
+ #*0)
+ # cpufreq-set -g powersave
+ # ;;
+
+ # Add code here to handle when the system is plugged in
+ # (maybe change cpu scaling to performance mode). For
+ # multicore systems, make sure you set performance mode
+ # for each core!
+ #*1)
+ # cpufreq-set -g performance
+ # ;;
+
+ *) log_unhandled $* ;;
+ esac
+ ;;
+
+ *) log_unhandled $* ;;
+esac
diff --git a/sys-power/acpid/files/acpid-2.0.16-conf.d b/sys-power/acpid/files/acpid-2.0.16-conf.d
new file mode 100644
index 000000000000..9aadb4cd814a
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.16-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_ARGS=""
diff --git a/sys-power/acpid/files/acpid-2.0.16-init.d b/sys-power/acpid/files/acpid-2.0.16-init.d
new file mode 100644
index 000000000000..aa8ff75f18e3
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.16-init.d
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+command="/usr/sbin/acpid"
+command_args="${ACPID_ARGS}"
+start_stop_daemon_args="--quiet"
+description="Daemon for Advanced Configuration and Power Interface"
+
+depend() {
+ need localmount
+ use logger
+}
+
+reload() {
+ ebegin "Reloading acpid configuration"
+ start-stop-daemon --exec $command --signal HUP
+ eend $?
+}
diff --git a/sys-power/acpid/files/systemd/acpid.service b/sys-power/acpid/files/systemd/acpid.service
new file mode 100644
index 000000000000..e4ddacdbead7
--- /dev/null
+++ b/sys-power/acpid/files/systemd/acpid.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ACPI event daemon
+Requires=acpid.socket
+
+[Service]
+ExecStart=/usr/sbin/acpid -f
+
+[Install]
+WantedBy=multi-user.target
+Also=acpid.socket
diff --git a/sys-power/acpid/files/systemd/acpid.socket b/sys-power/acpid/files/systemd/acpid.socket
new file mode 100644
index 000000000000..1b23f8735d48
--- /dev/null
+++ b/sys-power/acpid/files/systemd/acpid.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=ACPID Listen Socket
+
+[Socket]
+ListenStream=/var/run/acpid.socket
+
+[Install]
+WantedBy=sockets.target
diff --git a/sys-power/acpid/metadata.xml b/sys-power/acpid/metadata.xml
new file mode 100644
index 000000000000..1eb122264547
--- /dev/null
+++ b/sys-power/acpid/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>miska@gentoo.org</email>
+ <name>Michal Hrušecký</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">acpid2</remote-id>
+ </upstream>
+</pkgmetadata>