if [[ "$DMD_USER" == "y" ]]
then
  create_group audio &&
  create_account musicdaemon
# in future modify default config?
#  cp ${SCRIPT_DIRECTORY}/dermixd.conf .
else
  create_account nobody
#  sed 's/USER=dermixd/USER=nobody/' \
#  ${SCRIPT_DIRECTORY}/dermixd.conf > dermixd.conf
fi &&


BINDIR=${INSTALL_ROOT}/usr/bin &&
DOCDIR=${INSTALL_ROOT}/usr/share/doc/dermixd &&
install -v -d ${BINDIR} &&
install -v -d ${DOCDIR} &&
install -v dermixd ${BINDIR} &&
install -v README BUGS TODO LICENSE CHANGES ${DOCDIR} &&
if list_find "$OPTS" --enable-perl
then
  PERLDIR=${INSTALL_ROOT}/usr/lib/dermixd &&
  install -v -d ${PERLDIR} &&
  install -v frontend/simple_player ${BINDIR}/dermixd-play &&
  install -v frontend/dermixd-control ${BINDIR}/dermixd-control &&
  install -v frontend/shuffle ${BINDIR}/shuffle &&
  install -v frontend/Param.pm ${PERLDIR} &&
  install -v -d ${PERLDIR}/DerMixD &&
  install -v frontend/DerMixD/{Base,Control}.pm ${PERLDIR}/DerMixD
fi
