#!/bin/sh

################################################################################
#      This file is part of OpenELEC - http://www.openelec.tv
#      Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
#  This Program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
#
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with OpenELEC.tv; see the file COPYING.  If not, write to
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#  http://www.gnu.org/copyleft/gpl.html
################################################################################

. config/options $1

mkdir -p $INSTALL/usr/sbin
  cp $PKG_BUILD/daemons/lircd $INSTALL/usr/sbin

mkdir -p $INSTALL/etc/lirc
  cp $PKG_BUILD/remotes/mceusb/lircd.conf.mceusb $INSTALL/etc/lirc/lircd.conf
#  cp $PKG_BUILD/remotes/devinput/lircd.conf.devinput $INSTALL/etc/lirc

if [ "$DEVTOOLS" = yes ]; then
  mkdir -p $INSTALL/usr/sbin
    cp $PKG_BUILD/daemons/lircmd $INSTALL/usr/sbin # do we need this?

  mkdir -p $INSTALL/usr/bin
    cp $PKG_BUILD/tools/ircat $INSTALL/usr/bin # do we need this?
    cp $PKG_BUILD/tools/irexec $INSTALL/usr/bin # do we need this?
    cp $PKG_BUILD/tools/irpty $INSTALL/usr/bin
    cp $PKG_BUILD/tools/irsend $INSTALL/usr/bin
    cp $PKG_BUILD/tools/irw $INSTALL/usr/bin
    cp $PKG_BUILD/tools/lircrcd $INSTALL/usr/bin # do we need this?
    cp $PKG_BUILD/tools/mode2 $INSTALL/usr/bin
    cp $PKG_BUILD/daemons/irrecord $INSTALL/usr/bin
    cp $PKG_BUILD/tools/irsend $INSTALL/usr/bin # do we need this?
fi
