# Template file for 'acpid'
pkgname=acpid
version=2.0.19
revision=1
build_style=gnu-configure
short_desc="The ACPI Daemon (acpid) With Netlink Support"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://sourceforge.net/projects/acpid2/"
distfiles="${SOURCEFORGE_SITE}/acpid2/acpid-$version.tar.xz"
checksum=ce503bf3f36002b45a465dc8a2490c16c553abd5bc2c1c8ece86247ec281dcde
long_desc="
 In recent linux kernels, the /proc/acpi/event interface has been deprecated.
 The same information (and more) is available via netlink (a way for the kernel
 to communicate with userspace that is usually used for networking) and the
 input layer (mouse, keyboard, power button, etc...). This version of acpid
 supports netlink and the input layer."

post_install() {
	vinstall ${FILESDIR}/acpid.service 644 usr/lib/systemd/system
	vinstall ${FILESDIR}/acpid.socket 644 usr/lib/systemd/system
	vinstall ${FILESDIR}/handler.sh 755 etc/acpi
	vinstall ${FILESDIR}/anything 644 etc/acpi/events
}

acpid_package() {
	conf_files="/etc/acpi/events/anything /etc/acpi/handler.sh"
	systemd_services="acpid.socket on"
	pkg_install() {
		vmove all
	}
}
