Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 230471 | Differences between
and this patch

Collapse All | Expand All

(-)laptop-mode-tools-1.34.ebuild (-53 / +24 lines)
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? ( net-wireless/bluez-utils )
24
		hal? ( sys-apps/hal )
25
		scsi? ( sys-apps/sdparm )"
21
26
22
pkg_setup() {
27
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
28
38
src_unpack() {
29
src_unpack() {
39
	unpack ${A}
30
	unpack ${A}
31
	cd "${S}"
32
	epatch "${FILESDIR}/${P}-install.patch"
33
}
40
34
41
	ht_fix_file "${S}"/usr/sbin/lm-profiler
35
src_compile() {
36
	:
42
}
37
}
43
38
44
src_install() {
39
src_install() {
45
	dosbin usr/sbin/laptop_mode
40
	DESTDIR="${D}" \
46
	dosbin usr/sbin/lm-profiler
41
		MAN_D="/usr/share/man" \
47
	dosbin usr/sbin/lm-syslog-setup
42
		INIT_D="none" \
48
43
		APM="$(use apm && echo force || echo disabled)" \
49
	insinto /etc/laptop-mode
44
		ACPI="$(use acpi && echo force || echo disabled)" \
50
	doins etc/laptop-mode/laptop-mode.conf
45
		PMU="$(false && echo force || echo disabled)" \
51
	doins etc/laptop-mode/lm-profiler.conf
46
		./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
47
71
		exeinto /etc/acpi/actions/
48
	dodoc Documentation/laptop-mode.txt README
72
		doexe etc/acpi/actions/*
49
	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
}
50
}
80
51
81
pkg_postinst() {
52
pkg_postinst() {

Return to bug 230471