2016-05-18 14:29:49 -07:00
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
2017-09-17 16:46:41 +02:00
# Copyright (C) 2016-present Team LibreELEC
2016-05-18 14:29:49 -07:00
#
# LibreELEC 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 of the License, or
# (at your option) any later version.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME = "moonlight"
2018-01-04 18:43:32 +00:00
PKG_VERSION = "4d94439"
PKG_SHA256 = "5190f9c3a0fd17c7c8f0de8c2509f4749a2f399b7dc4d1402dd55c6f351260b2"
2016-10-12 18:56:14 -03:00
PKG_VERSION_NUMBER = "2.2.2"
2018-01-04 18:43:32 +00:00
PKG_REV = "108"
2016-05-20 13:58:41 -07:00
PKG_ARCH = "any"
2016-05-18 14:29:49 -07:00
PKG_LICENSE = "GPLv2"
2016-10-12 18:56:14 -03:00
PKG_SITE = "https://github.com/dead/script.moonlight"
PKG_URL = " https://github.com/dead/script.moonlight/archive/ $PKG_VERSION .tar.gz "
PKG_SOURCE_DIR = " script.moonlight- $PKG_VERSION * "
2016-05-18 14:29:49 -07:00
PKG_DEPENDS_TARGET = "toolchain moonlight-embedded"
PKG_SECTION = "script"
2016-09-12 13:31:06 +02:00
PKG_SHORTDESC = "Moonlight: implementation of NVIDIA's GameStream protocol"
PKG_LONGDESC = " Moonlight ( $PKG_VERSION_NUMBER ): allows you to stream your collection of games from your PC (with NVIDIA Gamestream) to your device and play them remotely "
2017-10-27 13:11:34 +02:00
PKG_TOOLCHAIN = "manual"
2016-05-18 14:29:49 -07:00
PKG_IS_ADDON = "yes"
2016-09-12 13:31:06 +02:00
PKG_ADDON_NAME = "Moonlight"
2016-05-18 14:29:49 -07:00
PKG_ADDON_TYPE = "xbmc.service.pluginsource"
PKG_ADDON_PROVIDES = "executable"
2017-01-25 20:58:37 +01:00
p o s t _ u n p a c k ( ) {
# don't use the files from the script
2017-02-17 06:40:16 +00:00
rm $PKG_BUILD /script.moonlight/icon.png
rm $PKG_BUILD /script.moonlight/changelog.txt
2017-01-25 20:58:37 +01:00
}
2016-05-18 14:29:49 -07:00
a d d o n ( ) {
mkdir -p $ADDON_BUILD /$PKG_ADDON_ID
2017-02-17 06:40:16 +00:00
cp -PR $PKG_BUILD /script.moonlight/* $ADDON_BUILD /$PKG_ADDON_ID
2016-05-18 14:29:49 -07:00
2017-01-25 20:58:37 +01:00
# use our own changelog.txt
cp $PKG_DIR /changelog.txt $ADDON_BUILD /$PKG_ADDON_ID
2016-05-18 14:29:49 -07:00
# let's use our addon.xml instead
rm $ADDON_BUILD /$PKG_ADDON_ID /addon.xml
mkdir -p $ADDON_BUILD /$PKG_ADDON_ID /bin
cp -P $( get_build_dir moonlight-embedded) /.$TARGET_NAME /moonlight $ADDON_BUILD /$PKG_ADDON_ID /bin
mkdir -p $ADDON_BUILD /$PKG_ADDON_ID /lib
2017-09-17 16:46:41 +02:00
cp $( get_build_dir moonlight-embedded) /.$TARGET_NAME /libgamestream/libgamestream.so.2 $ADDON_BUILD /$PKG_ADDON_ID /lib
cp $( get_build_dir moonlight-embedded) /.$TARGET_NAME /libgamestream/libmoonlight-common.so.2 $ADDON_BUILD /$PKG_ADDON_ID /lib
2016-05-18 14:29:49 -07:00
if [ " $KODIPLAYER_DRIVER " = "bcm2835-driver" ] ; then
cp -P $( get_build_dir moonlight-embedded) /.$TARGET_NAME /libmoonlight-pi.so $ADDON_BUILD /$PKG_ADDON_ID /lib
elif [ " $KODIPLAYER_DRIVER " = "libamcodec" ] ; then
cp -P $( get_build_dir moonlight-embedded) /.$TARGET_NAME /libmoonlight-aml.so $ADDON_BUILD /$PKG_ADDON_ID /lib
fi
2017-09-17 16:46:41 +02:00
cp $( get_build_dir libevdev) /.install_pkg/usr/lib/libevdev.so.2 $ADDON_BUILD /$PKG_ADDON_ID /lib
2016-05-18 14:29:49 -07:00
mkdir -p $ADDON_BUILD /$PKG_ADDON_ID /etc
cp -P $( get_build_dir moonlight-embedded) /moonlight.conf $ADDON_BUILD /$PKG_ADDON_ID /etc
2017-09-17 16:46:41 +02:00
cp -P $( get_build_dir moonlight-embedded) /gamecontrollerdb.txt $ADDON_BUILD /$PKG_ADDON_ID /etc
2016-05-18 14:29:49 -07:00
}