Switch to moonlight-qt on x86_64

This commit is contained in:
beebono 2023-10-01 14:56:36 -05:00 committed by GitHub
parent 899c886917
commit 2190611e88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,17 +2,45 @@
# Copyright (C) 2020-present Fewtarius
PKG_NAME="moonlight"
PKG_VERSION="36c1636f3c77345e6439f848def9a4f917e25834"
PKG_ARCH="any"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/moonlight-stream/moonlight-embedded"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain opus SDL2 libevdev alsa curl enet avahi libvdpau libcec ffmpeg"
PKG_SHORTDESC="Moonlight Embedded is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield, but built for Linux."
PKG_TOOLCHAIN="cmake"
PKG_SHORTDESC="Moonlight is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield, but built for Linux."
GET_HANDLER_SUPPORT="git"
PKG_PATCH_DIRS+="${DEVICE}"
if [ "${TARGET_ARCH}" = "x86_64" ]
then
PKG_SITE="https://github.com/moonlight-stream/moonlight-qt"
PKG_VERSION="18130fd8de19de90dad5542d66dbe8904a1acea7"
PKG_DEPENDS_TARGET+=" qt5"
PKG_TOOLCHAIN="manual"
make_target() {
git submodule update --init --recursive
qmake "CONFIG+=embedded" moonlight-qt.pro
make release
}
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/usr/config/modules
cp ${PKG_BUILD}/app/moonlight ${INSTALL}/usr/bin/
cp ${PKG_BUILD}/start_moonlight.sh ${INSTALL}/usr/bin/
chmod +x ${INSTALL}/usr/bin/*
mv ${INSTALL}/usr/bin/start_moonlight.sh ${INSTALL}/usr/config/modules/Start\ Moonlight.sh
}
else
PKG_SITE="https://github.com/moonlight-stream/moonlight-embedded"
PKG_VERSION="36c1636f3c77345e6439f848def9a4f917e25834"
PKG_TOOLCHAIN="cmake"
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/config/moonlight
cp -R ${PKG_BUILD}/moonlight.conf ${INSTALL}/usr/config/moonlight
rm ${INSTALL}/usr/etc/moonlight.conf
rm ${INSTALL}/usr/share/moonlight/gamecontrollerdb.txt
}
fi
if [ "${PROJECT}" = "Rockchip" ]
then
PKG_DEPENDS_TARGET+=" librga rkmpp"
@ -30,10 +58,3 @@ if [ "${VULKAN_SUPPORT}" = "yes" ]
then
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
fi
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/config/moonlight
cp -R ${PKG_BUILD}/moonlight.conf ${INSTALL}/usr/config/moonlight
rm ${INSTALL}/usr/etc/moonlight.conf
rm ${INSTALL}/usr/share/moonlight/gamecontrollerdb.txt
}