#!/bin/sh

. config/options $1

VER=`ls $BUILD/linux*/modules/lib/modules`

mkdir -p $INSTALL/lib/modules/$VER/rtl8192se
  cp $PKG_BUILD/HAL/rtl8192/r8192se_pci.ko $INSTALL/lib/modules/$VER/rtl8192se

mkdir -p $INSTALL/lib/firmware/RTL8192SE
  cp $PKG_BUILD/firmware/RTL8192SE/* $INSTALL/lib/firmware/RTL8192SE

strip_kmod $INSTALL/lib/modules/$VER/rtl8192se

$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null
for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do
  rm -f $i
done
