DESCRIPTION="Dave Jones' handy, informative x86 CPU diagnostic utility" HOMEPAGE="http://www.codemonkey.org.uk/x86info/" SRC_URI="http://www.codemonkey.org.uk/x86info/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 -*" IUSE="" DEPEND="virtual/kernel virtual/glibc" RDEPEND="" S=${WORKDIR}/${P} src_compile() { emake x86info || die } src_install() { #put executable in /usr/bin exeinto /usr/bin doexe ${S}/x86info # Add the aliases insinto /etc/modules.d newins ${FILESDIR}/x86info-modules.d x86info #install docs and man page dodoc ${S}/README dodoc ${S}/COPYING dodoc ${S}/ChangeLog dodoc ${S}/TODO doman ${S}/x86info.1 } pkg_postinst() { einfo ewarn "Your kernel must be built with the following options" ewarn "set to Y or M" ewarn " Processor type and features ->" ewarn " [*] /dev/cpu/*/msr - Model-specific register support" ewarn " [*] /dev/cpu/*/cpuid - CPU information support" einfo ewarn "Execute \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" ewarn "to have full functionality." einfo /usr/sbin/update-modules || return 0 } pkg_config() { #use this to create the needed device nodes if [ ! -d /dev/cpu ] ; then mkdir /dev/cpu fi for i in `seq 0 7` do if [ ! -d /dev/cpu/$i ] ; then mkdir /dev/cpu/$i fi if [ ! -e /dev/cpu/$i/cpuid ] ; then (cd /dev/cpu/$i ; mknod cpuid c 203 $i) fi if [ ! -e /dev/cpu/$i/msr ] ; then (cd /dev/cpu/$i ; mknod msr c 202 $i) fi done einfo einfo "cpuid & msr /dev nodes created." einfo }