diff options
author | zxp19821005 | 2024-05-14 10:35:14 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-14 10:35:14 +0800 |
commit | a63a3e68c88e1c9f653efe1b172ff1f6e4d50d40 (patch) | |
tree | 67c51521d64f1d2355f51bc0c14dc7bd2cb5aa66 | |
parent | 8ea6c1dbbde793551021cb48145f68d05fae3df5 (diff) | |
download | aur-a63a3e68c88e1c9f653efe1b172ff1f6e4d50d40.tar.gz |
update to 1.3.3
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | ytm-dlp-gui.sh | 21 |
3 files changed, 28 insertions, 14 deletions
@@ -1,6 +1,6 @@ pkgbase = ytm-dlp-gui pkgdesc = An ElectronJS app for downloading music off Youtube Music. - pkgver = 1.3.2 + pkgver = 1.3.3 pkgrel = 1 url = https://github.com/RENOMIZER/ytm-dlp-gui arch = any @@ -8,12 +8,12 @@ pkgbase = ytm-dlp-gui makedepends = gendesk makedepends = npm makedepends = nodejs - makedepends = git + makedepends = curl depends = electron26 conflicts = ytm-dlp-gui - source = ytm-dlp-gui-1.3.2.tar.gz::https://github.com/RENOMIZER/ytm-dlp-gui/archive/refs/tags/v1.3.2.tar.gz + source = ytm-dlp-gui-1.3.3.tar.gz::https://github.com/RENOMIZER/ytm-dlp-gui/archive/refs/tags/v1.3.3.tar.gz source = ytm-dlp-gui.sh - sha256sums = 4b3d0439dfefc2ee0c4c28a8edca4eee211a041292438ca5e1e54b67dad26615 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 1029f4d8f6f395a07cda3e6de4211535694c6738403eebbe5a1fa736bb425f4f + sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d pkgname = ytm-dlp-gui @@ -1,7 +1,7 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=ytm-dlp-gui _pkgname=YTM-DLP-GUI -pkgver=1.3.2 +pkgver=1.3.3 _electronversion=26 pkgrel=1 pkgdesc="An ElectronJS app for downloading music off Youtube Music." @@ -16,18 +16,19 @@ makedepends=( 'gendesk' 'npm' 'nodejs' - 'git' + 'curl' ) source=( "${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz" "${pkgname}.sh" ) -sha256sums=('4b3d0439dfefc2ee0c4c28a8edca4eee211a041292438ca5e1e54b67dad26615' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +sha256sums=('1029f4d8f6f395a07cda3e6de4211535694c6738403eebbe5a1fa736bb425f4f' + '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${pkgname}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname}.sh" gendesk -q -f -n --categories="Utility" --name="${pkgname}" --exec="${pkgname} %U" @@ -38,10 +39,10 @@ build() { export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')" export npm_config_target="${SYSTEM_ELECTRON_VERSION}" export ELECTRONVERSION="${_electronversion}" - export npm_config_disturl=https://electronjs.org/headers HOME="${srcdir}/.electron-gyp" if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then export npm_config_registry=https://registry.npmmirror.com + export npm_config_disturl=https://registry.npmmirror.com/-/binary/node/ export npm_config_electron_mirror=https://registry.npmmirror.com/-/binary/electron/ export npm_config_electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/ else diff --git a/ytm-dlp-gui.sh b/ytm-dlp-gui.sh index 7ddcaab8d734..398398461fee 100644 --- a/ytm-dlp-gui.sh +++ b/ytm-dlp-gui.sh @@ -1,16 +1,29 @@ #!/bin/bash -set -e +set -o pipefail _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" _OPTIONS="@options@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 export ELECTRON_FORCE_IS_PACKAGED=true +export ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |