# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils linux-mod DESCRIPTION="ACPI kernel driver to support hot-swapping of common 'bay' type peripherals on laptops" HOMEPAGE="http://lths.sourceforge.net/" SRC_URI="mirror://sourceforge/lths/${P}.tar.gz" LICENSE="GPL" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="" BUILD_PARAMS="KDIR=${KV_DIR}" BUILD_TARGETS="default" MODULE_NAMES="lt_hotswap(acpi:)" MODULESD_LT_HOTSWAP_DOCS="README" CONFIG_CHECK="ACPI !APM BLK_DEV_IDEDISK" ERROR_ACPI="${P} requires support for ACPI (CONFIG_ACPI)" ERROR_BLK_DEV_IDEDISK="${P} requires support for IDEDISK (CONFIG_BLK_DEV_IDEDISK)" ERROR_APM="${P} requires support for APM (CONFIG_APM) to be DISABLED" pkg_setup() { if kernel_is 2 4; then die "${P} does not support kernel 2.4.x" fi linux-mod_pkg_setup } src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-acpi-action-fix.patch } src_compile() { linux-mod_src_compile } src_install() { linux-mod_src_install insinto /etc/acpi/events doins config/lths exeinto /etc/acpi/actions doexe config/lths.sh } pkg_postinst() { linux-mod_pkg_postinst if ! (has_version sys-power/acpid); then einfo einfo "You may wish to install sys-power/acpid to handle the ACPI events generated" einfo "by ${PN}." einfo fi ewarn ewarn "NOTE: lt_hotswap will NOT work with the ata_piix kernel driver" ewarn "(CONFIG_BLK_DEV_PIIX)" ewarn }