diff options
author | zxp19821005 | 2023-12-14 15:14:56 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-14 15:14:56 +0800 |
commit | 6f06fc2a567a78a2e82a5b639c888e37e4e460d7 (patch) | |
tree | 017d9851eafc448f59577950637bbaeea72cc1a7 | |
parent | 28b77edce6407700e49026cf0e4ee76d43d21391 (diff) | |
download | aur-6f06fc2a567a78a2e82a5b639c888e37e4e460d7.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | youtube-smarttv-emu.sh | 17 |
3 files changed, 23 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = youtube-smarttv-emu-bin pkgdesc = A cross platform app built with Electron that opens an instance of the Smart TV version of Youtube. pkgver = 1.0.1 - pkgrel = 4 + pkgrel = 5 url = https://github.com/platevoltage/youtube-smarttv-emu arch = x86_64 license = MIT @@ -10,10 +10,10 @@ pkgbase = youtube-smarttv-emu-bin provides = youtube-smarttv-emu=1.0.1 conflicts = youtube-smarttv-emu source = youtube-smarttv-emu-1.0.1.deb::https://github.com/platevoltage/youtube-smarttv-emu/releases/download/v1.0.1/youtube-smarttv-emu_1.0.1_amd64.deb - source = LICENSE::https://raw.githubusercontent.com/platevoltage/youtube-smarttv-emu/v1.0.1/LICENCE + source = LICENSE-1.0.1::https://raw.githubusercontent.com/platevoltage/youtube-smarttv-emu/v1.0.1/LICENCE source = youtube-smarttv-emu.sh sha256sums = 83ba642af297fccc57f6017f32825b0cb523ed35f257905430b7b7cc14400aeb sha256sums = 2c7bd4372f284a7f952702e50d98d0ef6c5fbb1d1792f9d6d54862cd5fc03860 - sha256sums = 30dc5ec7ee4db5e27f12226d6931cd9dc76f38b5bdb5d49d3650f4b726e0bbab + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 pkgname = youtube-smarttv-emu-bin @@ -1,26 +1,31 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=youtube-smarttv-emu-bin pkgver=1.0.1 -pkgrel=4 +_electronversion=21 +pkgrel=5 pkgdesc="A cross platform app built with Electron that opens an instance of the Smart TV version of Youtube." arch=('x86_64') url="https://github.com/platevoltage/youtube-smarttv-emu" license=("MIT") depends=( - 'electron21' + "electron${_electronversion}" 'hicolor-icon-theme' ) provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") source=( "${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb" - "LICENSE::https://raw.githubusercontent.com/platevoltage/youtube-smarttv-emu/v${pkgver}/LICENCE" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/platevoltage/youtube-smarttv-emu/v${pkgver}/LICENCE" "${pkgname%-bin}.sh" ) sha256sums=('83ba642af297fccc57f6017f32825b0cb523ed35f257905430b7b7cc14400aeb' '2c7bd4372f284a7f952702e50d98d0ef6c5fbb1d1792f9d6d54862cd5fc03860' - '30dc5ec7ee4db5e27f12226d6931cd9dc76f38b5bdb5d49d3650f4b726e0bbab') + '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') build() { + sed -e "s|@electronversion@|${_electronversion}|" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data.tar.xz" sed "s|/opt/${pkgname%-bin}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" } @@ -32,5 +37,5 @@ package() { install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" done - install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file diff --git a/youtube-smarttv-emu.sh b/youtube-smarttv-emu.sh index ad497fea1a67..2ec4412e5c4f 100644 --- a/youtube-smarttv-emu.sh +++ b/youtube-smarttv-emu.sh @@ -1,11 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron21 -APPDIR="/usr/lib/youtube-smarttv-emu" -export PATH="${APPDIR}:${PATH}" -#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}" -_ASAR="${APPDIR}/app.asar" +set -e +_APPDIR="/usr/lib/@appname@" +export PATH="${_APPDIR}:${PATH}" +export ELECTRON_IS_DEV=0 +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +_ASAR="${_APPDIR}/@appasar@" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" fi
\ No newline at end of file |