#!/bin/sh NAME="i2c-tools" DESC="Tools for monitoring I2C devices" MAKEDEPS="linux-headers python" PKG_VER=4.3 SOURCE="https://fossies.org/linux/misc/i2c-tools-$PKG_VER.tar.gz" prepare() { sed -e "s|^DESTDIR.*|DESTDIR = \"$PKG_DEST\"|" \ -e "s|^prefix.*|prefix = /usr|" \ -e "s|^PREFIX.*|PREFIX = /usr|" \ -i Makefile } build() { make cd "$BUILD_ROOT"/py-smbus CFLAGS="$CFLAGS -I$BUILD_ROOT/include" python3 setup.py build } package() { make install cd "$BUILD_ROOT"/py-smbus python3 setup.py install --prefix=/usr --root="$PKG_DEST" }