# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit linux-info eutils toolchain-funcs COMMITID="6e4e2a000124f08f1a4e3791c2b02ec9ae6af393" DESCRIPTION="A tool to log and decode Machine Check Exceptions" HOMEPAGE="http://mcelog.org/" SRC_URI="http://git.kernel.org/?p=utils/cpu/mce/mcelog.git;a=snapshot;h=${COMMITID};sf=tgz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND="" CONFIG_CHECK="~X86_MCE" S="${WORKDIR}/${PN}-${COMMITID:0:7}" # test suite needs mce-inject, we don't have a package for it yet RESTRICT="test" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${PN}-0.8_pre1-timestamp-mcelog.patch sed -i \ -e 's:-g:${CFLAGS}:g' \ -e 's:\tgcc:\t$(CC):g' Makefile || die "sed makefile failed" } src_compile() { emake CC="$(tc-getCC)" || die } src_install() { dosbin mcelog || die doman mcelog.8 insinto /etc/cron.daily newins mcelog.cron mcelog || die insinto /etc/logrotate.d/ newins mcelog.logrotate mcelog || die newinitd "${FILESDIR}"/mcelog.init mcelog dodoc CHANGES README TODO *.pdf }