#!/bin/sh

. config/options

require_cxx $1

VDR_DIR=`basename $BUILD/vdr-1*`

cd $BUILD/$VDR_DIR

do_install usr/bin/vdr
cp $ROOT/$PACKAGES/$1/scripts/* $INSTALL/usr/bin

mkdir -p $INSTALL/usr/lib/vdr

for loc in $INCLUDED_LOCALES; do
  LOCALE=`echo $loc|cut -f1 -d.`
  [ -d .install/usr/share/locale/$LOCALE ] && \
    do_install usr/share/locale/$LOCALE
done

do_install etc/vdr
[ "$SERVICES" = yes ] && echo '0.0.0.0/0' >> $INSTALL/etc/vdr/svdrphosts.conf
mkdir -p $INSTALL/etc/vdr/plugins
mkdir -p $INSTALL/etc/vdr/plugins.d

cp $ROOT/$PACKAGES/$1/config/wakeup $INSTALL/etc
