1 # Copyright 1999-2007 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="http://archive.ubuntu.com/ubuntu/pool/main/a/acpi-support/acpi-support_${PV}.tar.gz"
14 IUSE="X hibernate-script video_cards_radeon"
17 RDEPEND="sys-power/acpid
22 sys-power/powermgmt-base
23 hibernate-script? ( sys-power/hibernate-script )
25 video_cards_radeon? ( app-laptop/radeontool )"
27 # Say thanks to whoever packaged this...
28 S=${WORKDIR}/${PN}-0.94
32 epatch "${FILESDIR}/${P}-gentoo.patch"
33 use hibernate-script && sed -i '/USE_HIBERNATE_SCRIPT=true/ s/# //' "${S}/acpi-support"
34 use video_cards_radeon && sed -i '/RADEON_LIGHT=true/ s/# //' "${S}/acpi-support"
35 use X || sed -i '/xset/ s/\(.*\)/#\1/' "${S}/"{lid.sh,lib/screenblank}
36 sed -i "s!/etc/default/acpi-support!/etc/conf.d/${PN}!" "${S}/"{*.sh,vbesave} || die "sed failed"
40 sed -i 's/strip acpi_fakekey//' Makefile
41 emake || die "emake failed"
47 insinto /usr/share/${PN}
48 doins key-constants lib/*
56 newinitd debian/init.d ${PN}
58 keepdir /etc/acpi/{local,{resume,battery,events,suspend,start,ac}.d} /var/lib/${PN}
63 elog "You may wish to read the Gentoo Linux Power Management Guide,"
64 elog "which can be found online at:"
66 elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
68 elog "The following packages provide additional functionality:"
70 elog "app-laptop/laptop-mode-tools"
71 elog "app-laptop/toshset"
72 elog "sys-power/kpowersave"
73 elog "sys-power/powersave"
74 elog "sys-apps/855resolution"
75 elog "sys-apps/pcmciautils"
77 elog "To initialize power management options for your devices at"
78 elog "system startup, please run the following:"
80 elog "rc-update add ${PN} default"
82 elog "This package will not work until you restart acpid. Please run the following:"
84 elog "/etc/init.d/acpid restart"