/[gentoo-x86]/sys-apps/x86info/x86info-1.25.ebuild
Gentoo

Contents of /sys-apps/x86info/x86info-1.25.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Mar 30 13:20:39 2012 UTC (6 years, 5 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
punt the non-building copies

(Portage version: 2.2.0_alpha96/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/x86info/x86info-1.25.ebuild,v 1.2 2010/02/07 19:42:28 maekke Exp $
4
5 EAPI=2
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="Dave Jones' handy, informative x86 CPU diagnostic utility"
9 HOMEPAGE="http://www.codemonkey.org.uk/projects/x86info/"
10 SRC_URI="http://www.codemonkey.org.uk/projects/x86info/${P}.tgz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="-* amd64 x86"
15 IUSE=""
16
17 RDEPEND=""
18 DEPEND="sys-apps/sed" # used in the makefile
19
20 src_prepare() {
21 epatch "${FILESDIR}"/1.21-pic.patch
22 epatch "${FILESDIR}"/${PN}-1.24-pic.patch #270388
23 epatch "${FILESDIR}"/${PN}-1.25-parallel-make-cleanup.patch
24 }
25
26 src_compile() {
27 emake deps \
28 || die "emake deps failed"
29 emake x86info lsmsr \
30 CC="$(tc-getCC)" \
31 CFLAGS="${CFLAGS} ${CPPFLAGS}" \
32 LDFLAGS="${LDFLAGS}" \
33 || die "emake failed"
34 }
35
36 src_install() {
37 dobin x86info lsmsr || die
38
39 insinto /etc/modprobe.d
40 newins "${FILESDIR}"/x86info-modules.conf-rc x86info.conf
41
42 dodoc TODO README
43 doman x86info.1 lsmsr.8
44 insinto /usr/share/doc/${PF}
45 doins -r results
46 prepalldocs
47 }
48
49 pkg_preinst() {
50 if [ -a "${ROOT}"/etc/modules.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info ] ; then
51 elog "Moving x86info from /etc/modules.d/ to /etc/modprobe.d/"
52 mv "${ROOT}"/etc/{modules,modprobe}.d/x86info
53 fi
54 if [ -a "${ROOT}"/etc/modprobe.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info.conf ] ; then
55 elog "Adding .conf suffix to x86info in /etc/modprobe.d/"
56 mv "${ROOT}"/etc/modprobe.d/x86info{,.conf}
57 fi
58 }
59
60 pkg_postinst() {
61 ewarn "Your kernel must be built with the following options"
62 ewarn "set to Y or M"
63 ewarn " Processor type and features ->"
64 ewarn " [*] /dev/cpu/*/msr - Model-specific register support"
65 ewarn " [*] /dev/cpu/*/cpuid - CPU information support"
66 }

  ViewVC Help
Powered by ViewVC 1.1.20