summaryrefslogtreecommitdiff
blob: c3c5297db8d8410b23aab8d1a2da2411b84cf97a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/longrun/longrun-0.9-r2.ebuild,v 1.2 2005/09/03 21:35:27 betelgeuse Exp $

inherit eutils linux-info

DESCRIPTION="A utility to control Transmeta's Crusoe and Efficeon processors"
HOMEPAGE="http://freshmeat.net/projects/longrun/"
DEBIAN_PATCH="${PN}_${PV}-17.diff.gz"
SRC_URI="mirror://kernel/linux/utils/cpu/crusoe/${P}.tar.bz2
		 mirror://debian/pool/main/l/${PN}/${DEBIAN_PATCH}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-ppc x86"
IUSE=""

DEPEND="virtual/libc"

S=${WORKDIR}/${PN}

CONFIG_CHECK="X86_MSR X86_CPUID"

ERROR_X86_MSR="
Longrun needs a MSR device to function. Please select
MSR under Processor type and features. It can be build
directly into the kernel or as a module.
"

ERROR_X86_CPUID="
Longrun needs a CPUID device to function. Please select
CPUID under Processor type and features. It can be
build directly into the kernel or as a module.
"

src_unpack() {
	unpack ${P}.tar.bz2
	cd ${S}
	epatch ${DISTDIR}/${DEBIAN_PATCH}
}

src_compile() {
	emake || die "emake failed"
}

src_install() {
	dosbin longrun || die "dosbin failed"
	doman longrun.1
	dodoc MAKEDEV-cpuid-msr
}

pkg_postinst() {
	if linux_chkconfig_module X86_MSR; then
		einfo "You have compiled MSR as a module."
		einfo "You need to load it before using Longrun."
		einfo "The module is called msr."
		einfo
	fi

	if linux_chkconfig_module X86_CPUID; then
		einfo "You have compiled CPUID as a module."
		einfo "You need to load it before using Longrun."
		einfo "The module is called cpuid."
	fi
}