diff options
author | zxp19821005 | 2024-05-31 13:07:43 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-31 13:07:43 +0800 |
commit | 6a06db159b43628e8bf0383b59deca51c0b4f340 (patch) | |
tree | 970246f6bc3d7a54ccb91010f62da031193bade0 | |
parent | 696ce86855a8a044e8be7d4e26ca15bd14d6ece3 (diff) | |
download | aur-6a06db159b43628e8bf0383b59deca51c0b4f340.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | r3play.sh | 21 |
3 files changed, 31 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = r3play-bin pkgdesc = 高颜值的第三方网易云播放器,支持 Windows/macOS/Linux.原名YesPlayMusic. pkgver = 2.0.0_alpha_2 - pkgrel = 3 + pkgrel = 4 url = https://music.qier222.com/ arch = x86_64 license = MIT @@ -13,11 +13,12 @@ pkgbase = r3play-bin conflicts = yesplaymusic conflicts = r3playx options = !strip + options = !emptydirs source = r3play-2.0.0_alpha_2.AppImage::https://github.com/qier222/YesPlayMusic/releases/download/v2.0.0-alpha-2/R3PLAY-2.0.0-linux.AppImage source = LICENSE-2.0.0_alpha_2::https://raw.githubusercontent.com/qier222/YesPlayMusic/v2.0.0-alpha-2/LICENSE source = r3play.sh sha256sums = 6108bdc25f8c27fedd4cad07e8c6f20c3eed895bea46f6d73123ad889d927ec7 sha256sums = db52e3daad9260a1cc638efaf3f6b7a6bdead236365586a60078a9a287613037 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = r3play-bin @@ -3,7 +3,7 @@ pkgname=r3play-bin _pkgname=R3PLAY pkgver=2.0.0_alpha_2 _electronversion=23 -pkgrel=3 +pkgrel=4 pkgdesc="高颜值的第三方网易云播放器,支持 Windows/macOS/Linux.原名YesPlayMusic." arch=('x86_64') url="https://music.qier222.com/" @@ -22,7 +22,10 @@ depends=( makedepends=( 'fuse2' ) -options=('!strip') +options=( + '!strip' + '!emptydirs' +) source=( "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver//_/-}/${_pkgname}-${pkgver%_alpha_2}-linux.AppImage" "LICENSE-${pkgver}::https://raw.githubusercontent.com/qier222/YesPlayMusic/v${pkgver//_/-}/LICENSE" @@ -30,11 +33,12 @@ source=( ) sha256sums=('6108bdc25f8c27fedd4cad07e8c6f20c3eed895bea46f6d73123ad889d927ec7' 'db52e3daad9260a1cc638efaf3f6b7a6bdead236365586a60078a9a287613037' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|g" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@appasar@|app|g" \ + -e "s|@cfgdirname@|${_pkgname}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" @@ -42,10 +46,13 @@ build() { sed "s|AppRun --no-sandbox|${pkgname%-bin}|g;s|Music|AudioVideo|g;s|desktop|${pkgname%-bin}|g" \ -i "${srcdir}/squashfs-root/desktop.desktop" find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \; + sed -e "s|..\/..\/Resources\/bin\/better_sqlite3.node|\/usr\/lib\/${pkgname%-bin}\/bin\/better_sqlite3.node|g" \ + -e "s|..\/resources\/bin\/better_sqlite3.node|\/usr\/lib\/${pkgname%-bin}\/bin\/better_sqlite3.node|g" \ + -i "${srcdir}/squashfs-root/resources/app/main/index.js" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" - install -Dm755 "${srcdir}/squashfs-root/resources/bin/better_sqlite3.node" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm755 "${srcdir}/squashfs-root/resources/bin/better_sqlite3.node" -t "${pkgdir}/usr/lib/${pkgname%-bin}/bin" cp -r "${srcdir}/squashfs-root/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}" install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib" for _icons in 16x16 24x24 32x32 48x48 64x64 88x88 128x128 256x256 512x512 1024x1024;do diff --git a/r3play.sh b/r3play.sh index 7ddcaab8d734..4cfe3ac09dd8 100644 --- a/r3play.sh +++ b/r3play.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 |