# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Standalone version of pysmbus from i2c-tools." HOMEPAGE="http://www.lm-sensors.org/wiki/I2CTools" SRC_URI="http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-${PV}.tar.bz2 http://www.zirona.com/misc/code/eee-control/${P}-smbusmodule.c.patch" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="sys-apps/i2c-tools" IUSE="" src_unpack() { unpack ${A} mv "${WORKDIR}/i2c-tools-${PV}" "${WORKDIR}/py-smbus-${PV}" || die "Renaming directory failed!" } src_compile() { cd "${S}/py-smbus/" epatch ${DISTDIR}/${P}-smbusmodule.c.patch || die "Patching smbusmodule.c failed." python setup.py build || die "Building the package failed!" } src_install() { cd "${S}/py-smbus/" python setup.py install --root ${D} || die "The base installation routine failed!" } pkg_postinst() { ewarn "This package is to be considered a temporary solution for now, as" ewarn "py-smbus currently doesn't get built with sys-apps/i2c-tools (#246182)." ewarn "Anyway: If someday i2c-tools will build py-smbus itself, you must unmerge" ewarn "this package first." }