inherit eutils linux-mod
DESCRIPTION="Acpi daemon and kernel module to control Sony Laptop Hotkeys"
HOMEPAGE="http://sylvain-calador.fr/acpi4sony"
SRC_URI="http://sylvain-calador.fr/${PN}/${P}.tar.bz2"
RESTRICT="nomirror"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
MODULE_NAMES="sony_acpi(acpi:${S}/driver)"
BUILD_TARGETS=" "
RDEPEND="sys-power/acpid"
pkg_setup() {
linux-mod_pkg_setup
if ! (linux_chkconfig_present ACPI); then
eerror "${P} requires in-kernel ACPI support."
die "CONFIG_ACPI support not detected"
fi
BUILD_PARAMS="KERNELSRC=${KV_DIR}"
}
src_compile() {
linux-mod_src_compile
emake -C sony_acpid
}
src_install() {
linux-mod_src_install
dobin sony_acpid/sony_acpid
doman sony_acpid/sony_acpid.8
dodoc README Changelog
exeinto /etc/init.d
newexe ${FILESDIR}/sony_acpid.rc6 sony_acpid
}
pkg_postinst() {
linux-mod_pkg_postinst
echo
einfo
einfo "The acpi4sony package has been installed."
einfo
einfo "If you would like the service to start automatically on boot"
einfo "please execute the command rc-update add sony_acpid default."
einfo
einfo "See /usr/share/doc/${PF}/README.gz for details."
einfo
echo
}