#!/bin/sh

. config/options

cd $BUILD/$1*

do_install usr/bin/mplayer

mkdir -p $INSTALL/etc/mplayer
cp $ROOT/$PACKAGES/$1/config/mplayer.enna $INSTALL/etc/mplayer/mplayer.conf
cp $ROOT/$PACKAGES/$1/config/input.conf $INSTALL/etc/mplayer
cp $ROOT/$PACKAGES/$1/scripts/mp_set_option $INSTALL/usr/bin

mkdir -p $INSTALL/usr/lib/mplayer
cp $ROOT/$PACKAGES/$1/scripts/setup* $INSTALL/usr/lib/mplayer

[ "$TARGET_PLATFORM" = easygate ] && \
  sed -i 's%mixer-channel=.*%mixer-channel=PCM%' \
    $INSTALL/etc/mplayer/mplayer.conf

cat <<EOF > $INSTALL/etc/mplayer/no_unstable_vidix
You can enable nvidia/sis vidix driver simply by removing this file.
Vidix should give you better performance especially with low-end hardware.
This feature is not very well tested. That's why it is not enabled by
default. And that's also why you should help us, testing this feature
and reporting your results if you own nvidia/sis hardware.
EOF

cp etc/codecs.conf $INSTALL/etc/mplayer
