#!/bin/sh

. config/options

$SCRIPTS/build toolchain

PKG_DIR=`find $PACKAGES -type d -name $1`

cd $PKG_BUILD

make OPT="$TARGET_CFLAGS" \
     CROSS_COMPILE=${TARGET_PREFIX} \
     HOST=$TARGET_ARCH-linux \
     IDSDIR="/usr/share" \
     ZLIB=no \
     DNS=no \
     PREFIX=/usr \

make PREFIX=/usr \
     IDSDIR="/usr/share" \
     DESTDIR=$SYSROOT_PREFIX install-lib

./update-pciids.sh || cp $ROOT/$PKG_DIR/pci.ids .
