1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="Ubuntu scripts and events for acpid, power management, and vendor-specific laptop configuration"
8 HOMEPAGE="http://packages.ubuntu.com/feisty/admin/acpi-support"
9 SRC_URI="mirror://ubuntu/pool/main/a/acpi-support/${PN}_${PV}.tar.gz"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="X hibernate-script video_cards_radeon"
16 RDEPEND="sys-power/acpid
21 sys-power/powermgmt-base
22 hibernate-script? ( sys-power/hibernate-script )
24 video_cards_radeon? ( app-laptop/radeontool )"
28 epatch "${FILESDIR}/${P}-gentoo.patch"
29 use hibernate-script && sed -i '/USE_HIBERNATE_SCRIPT=true/ s/# //' "${S}/acpi-support"
30 use video_cards_radeon && sed -i '/RADEON_LIGHT=true/ s/# //' "${S}/acpi-support"
31 use X || sed -i '/xset/ s/\(.*\)/#\1/' "${S}/"{lid.sh,lib/screenblank}
32 sed -i "s!/etc/default/acpi-support!/etc/conf.d/${PN}!" "${S}/"{*.sh,vbesave} || die "sed failed"
36 sed -i 's/strip acpi_fakekey//' Makefile
37 emake || die "emake failed"
43 insinto /usr/share/${PN}
44 doins key-constants lib/*
52 newinitd debian/init.d ${PN}
54 keepdir /etc/acpi/{local,{resume,battery,events,suspend,start,ac}.d} /var/lib/${PN}
59 elog "You may wish to read the Gentoo Linux Power Management Guide,"
60 elog "which can be found online at:"
62 elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
64 elog "The following packages provide additional functionality:"
66 elog "app-laptop/laptop-mode-tools"
67 elog "app-laptop/toshset"
68 elog "sys-power/kpowersave"
69 elog "sys-power/powersave"
70 elog "sys-apps/855resolution"
71 elog "sys-apps/pcmciautils"
73 elog "To initialize power management options for your devices at"
74 elog "system startup, please run the following:"
76 elog "rc-update add ${PN} default"
78 elog "This package will not work until you restart acpid. Please run the following:"
80 elog "/etc/init.d/acpid restart"