Lines 2-8
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.34.ebuild,v 1.2 2008/06/03 22:45:17 darkside Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.34.ebuild,v 1.2 2008/06/03 22:45:17 darkside Exp $ |
4 |
|
4 |
|
5 |
inherit fixheadtails linux-info |
5 |
inherit eutils |
6 |
|
6 |
|
7 |
MY_P="${PN}_${PV}" |
7 |
MY_P="${PN}_${PV}" |
8 |
|
8 |
|
Lines 14-81
LICENSE="GPL-2"
Link Here
|
14 |
SLOT="0" |
14 |
SLOT="0" |
15 |
KEYWORDS="~amd64 ~ppc ~x86" |
15 |
KEYWORDS="~amd64 ~ppc ~x86" |
16 |
|
16 |
|
17 |
IUSE="acpi apm" |
17 |
IUSE="acpi apm pmu bluetooth hal scsi" |
18 |
|
18 |
|
19 |
DEPEND="acpi? ( sys-power/acpid ) |
19 |
DEPEND="sys-apps/ethtool |
20 |
apm? ( sys-apps/apmd )" |
20 |
acpi? ( sys-power/acpid ) |
|
|
21 |
apm? ( sys-apps/apmd ) |
22 |
pmu? ( sys-power/pm-utils ) |
23 |
bluetooth? ( |
24 |
|| ( |
25 |
net-wireless/bluez |
26 |
net-wireless/bluez-utils |
27 |
) |
28 |
) |
29 |
hal? ( sys-apps/hal ) |
30 |
scsi? ( sys-apps/sdparm )" |
21 |
|
31 |
|
22 |
pkg_setup() { |
32 |
S="${WORKDIR}/${MY_P}" |
23 |
linux-info_pkg_setup |
|
|
24 |
|
25 |
if kernel_is 2 6 && kernel_is lt 2 6 6; then |
26 |
eerror |
27 |
eerror "${P} requires kernel version 2.6.6 or newer." |
28 |
eerror |
29 |
die "${P} requires kernel version 2.6.6 or newer" |
30 |
elif kernel_is 2 4 && kernel_is lt 2 4 23; then |
31 |
eerror |
32 |
eerror "${P} requires kernel version 2.4.23 or newer." |
33 |
eerror/eti |
34 |
die "${P} requires kernel version 2.4.23 or newer" |
35 |
fi |
36 |
} |
37 |
|
33 |
|
38 |
src_unpack() { |
34 |
src_unpack() { |
39 |
unpack ${A} |
35 |
unpack ${A} |
|
|
36 |
cd "${S}" |
37 |
epatch "${FILESDIR}/${P}-install.patch" |
38 |
} |
40 |
|
39 |
|
41 |
ht_fix_file "${S}"/usr/sbin/lm-profiler |
40 |
src_compile() { |
|
|
41 |
: |
42 |
} |
42 |
} |
43 |
|
43 |
|
44 |
src_install() { |
44 |
src_install() { |
45 |
dosbin usr/sbin/laptop_mode |
45 |
DESTDIR="${D}" \ |
46 |
dosbin usr/sbin/lm-profiler |
46 |
MAN_D="/usr/share/man" \ |
47 |
dosbin usr/sbin/lm-syslog-setup |
47 |
INIT_D="none" \ |
48 |
|
48 |
APM="$(use apm && echo force || echo disabled)" \ |
49 |
insinto /etc/laptop-mode |
49 |
ACPI="$(use acpi && echo force || echo disabled)" \ |
50 |
doins etc/laptop-mode/laptop-mode.conf |
50 |
PMU="$(false && echo force || echo disabled)" \ |
51 |
doins etc/laptop-mode/lm-profiler.conf |
51 |
./install.sh |
52 |
|
|
|
53 |
newinitd "${FILESDIR}"/laptop_mode.init laptop_mode |
54 |
|
55 |
keepdir /etc/laptop-mode/batt-start |
56 |
keepdir /etc/laptop-mode/batt-stop |
57 |
keepdir /etc/laptop-mode/lm-ac-start |
58 |
keepdir /etc/laptop-mode/lm-ac-stop |
59 |
keepdir /etc/laptop-mode/nolm-ac-start |
60 |
keepdir /etc/laptop-mode/nolm-ac-stop |
61 |
keepdir /etc/laptop-mode/scripts |
62 |
|
63 |
doman man/* |
64 |
|
65 |
dodoc Documentation/*.txt README |
66 |
|
67 |
if use acpi; then |
68 |
insinto /etc/acpi/events/ |
69 |
doins etc/acpi/events/* |
70 |
|
52 |
|
71 |
exeinto /etc/acpi/actions/ |
53 |
dodoc Documentation/laptop-mode.txt README |
72 |
doexe etc/acpi/actions/* |
54 |
newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode |
73 |
fi |
|
|
74 |
|
75 |
if use apm; then |
76 |
exeinto /etc/apm/event.d/ |
77 |
doexe etc/apm/event.d/* |
78 |
fi |
79 |
} |
55 |
} |
80 |
|
56 |
|
81 |
pkg_postinst() { |
57 |
pkg_postinst() { |