mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 02:42:56 +02:00
Added acpid-1.0.10 build template.
--HG-- extra : convert_revision : 95ca6a9f541ec73b9debaa8cd60cfafdf27ef61a
This commit is contained in:
parent
c077559a89
commit
24664c14c6
4 changed files with 133 additions and 0 deletions
6
srcpkgs/acpid/files/acpid.confd
Normal file
6
srcpkgs/acpid/files/acpid.confd
Normal file
|
@ -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=""
|
39
srcpkgs/acpid/files/acpid.rc
Normal file
39
srcpkgs/acpid/files/acpid.rc
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/sbin/runscript
|
||||||
|
# Copyright 1999-2007 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/sys-power/acpid/files/acpid-1.0.6-init.d,v 1.3 2009/01/19 04:48:49 vapier Exp $
|
||||||
|
|
||||||
|
opts="reload"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need localmount
|
||||||
|
use logger
|
||||||
|
before hald
|
||||||
|
}
|
||||||
|
|
||||||
|
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 --quiet --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 $?
|
||||||
|
}
|
59
srcpkgs/acpid/files/default.sh
Normal file
59
srcpkgs/acpid/files/default.sh
Normal file
|
@ -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)
|
||||||
|
/sbin/init 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
# 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
|
29
srcpkgs/acpid/template
Normal file
29
srcpkgs/acpid/template
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Template file for 'acpid'
|
||||||
|
pkgname=acpid
|
||||||
|
version=1.0.10
|
||||||
|
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz"
|
||||||
|
build_style=gnu_makefile
|
||||||
|
make_install_args="INSTPREFIX=$XBPS_DESTDIR/$pkgname-$version
|
||||||
|
MAN8DIR=$XBPS_DESTDIR/$pkgname-$version/usr/share/man/man8"
|
||||||
|
short_desc="A daemon for delivering ACPI power management events"
|
||||||
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
checksum=22703ce0dd7305aca01bc9ac741659c32b1593f1d6fde492df7f01067a534760
|
||||||
|
long_desc="
|
||||||
|
ACPID used to try to handle events internally. Rather than try to climb
|
||||||
|
an ever-growing mountain, ACPID now lets YOU define what events to handle.
|
||||||
|
Any event that publishes itself to /proc/acpi/event can be handled."
|
||||||
|
|
||||||
|
openrc_services="acpid default"
|
||||||
|
conf_files="/etc/conf.d/acpid"
|
||||||
|
Add_dependency full glibc
|
||||||
|
|
||||||
|
post_install()
|
||||||
|
{
|
||||||
|
chmod 755 ${DESTDIR}/usr/sbin/acpid || return 1
|
||||||
|
install -D -m755 ${FILESDIR}/acpid.rc \
|
||||||
|
${DESTDIR}/etc/init.d/acpid || return 1
|
||||||
|
install -D -m644 ${FILESDIR}/acpid.confd \
|
||||||
|
${DESTDIR}/etc/conf.d/acpid || return 1
|
||||||
|
install -D -m755 ${FILESDIR}/default.sh \
|
||||||
|
${DESTDIR}/etc/acpi/default.sh || return 1
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue