#!/bin/sh

. config/options

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

get_graphicdrivers

mkdir -p $INSTALL/usr/lib
  cp -PR $PKG_BUILD/.libs/libdrm.so* $INSTALL/usr/lib
  cp -PR $PKG_BUILD/libkms/.libs/libkms.so* $INSTALL/usr/lib || true

for drv in $DRM_DRIVERS; do
  cp -PR $PKG_BUILD/$drv/.libs/libdrm_$drv*.so* $INSTALL/usr/lib
    rm -rf $INSTALL/usr/lib/libdrm_$drv*.so*T
done
