diff options
author | zxp19821005 | 2024-01-04 09:45:00 +0800 |
---|---|---|
committer | zxp19821005 | 2024-01-04 09:45:00 +0800 |
commit | a86095a1e8c4b84fd86e300459c8ec89df2fee84 (patch) | |
tree | b3b743945101fa4ad78f93d211fedad709b38d7e | |
parent | 16b96a8caa146ee6fedbc9f0af466e7f17c99119 (diff) | |
download | aur-a86095a1e8c4b84fd86e300459c8ec89df2fee84.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | muffon.sh | 21 |
3 files changed, 28 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = muffon-bin pkgdesc = Music streaming browser,retrieves audio, video and metadata from various Internet sources. pkgver = 2.0.1 - pkgrel = 1 + pkgrel = 2 url = https://muffon.netlify.app/ arch = x86_64 license = MIT @@ -10,10 +10,10 @@ pkgbase = muffon-bin provides = muffon=2.0.1 conflicts = muffon source = muffon-2.0.1.pacman::https://github.com/staniel359/muffon/releases/download/v2.0.1/muffon-2.0.1-linux-x64.pacman - source = LICENSE::https://raw.githubusercontent.com/staniel359/muffon/v2.0.1/LICENSE + source = LICENSE-2.0.1::https://raw.githubusercontent.com/staniel359/muffon/v2.0.1/LICENSE source = muffon.sh sha256sums = a0e854ced7fab75f610c6e04e683dc7a9e7eaab056328c3119625bf34ebfa3c0 sha256sums = 8486a10c4393cee1c25392769ddd3b2d6c242d6ec7928e1414efff7dfb2f07ef - sha256sums = 94c9502f6922a4fe4c58e0dc24679afcd7ae563cf8c42a7110462d3a708981cc + sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf pkgname = muffon-bin @@ -1,7 +1,8 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=muffon-bin pkgver=2.0.1 -pkgrel=1 +_electronversion=27 +pkgrel=2 pkgdesc="Music streaming browser,retrieves audio, video and metadata from various Internet sources." arch=('x86_64') url="https://muffon.netlify.app/" @@ -10,29 +11,32 @@ license=("MIT") provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'electron27' + "electron${_electronversion}" 'hicolor-icon-theme' ) source=( "${pkgname%-bin}-${pkgver}.pacman::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}-${pkgver}-linux-x64.pacman" - "LICENSE::https://raw.githubusercontent.com/staniel359/muffon/v${pkgver}/LICENSE" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/staniel359/muffon/v${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) sha256sums=('a0e854ced7fab75f610c6e04e683dc7a9e7eaab056328c3119625bf34ebfa3c0' '8486a10c4393cee1c25392769ddd3b2d6c242d6ec7928e1414efff7dfb2f07ef' - '94c9502f6922a4fe4c58e0dc24679afcd7ae563cf8c42a7110462d3a708981cc') + '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf') build() { - sed "s|/opt/${pkgname%-bin}/${pkgname%-bin} %U|${pkgname%-bin}|g;s|Audio;|AudioVideo;|g" \ + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" + sed "s|/opt/${pkgname%-bin}/${pkgname%-bin}|${pkgname%-bin}|g;s|Audio;|AudioVideo;|g" \ -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" install -Dm644 "${srcdir}/opt/${pkgname%-bin}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" - #cp -r "${srcdir}/opt/${pkgname%-bin}/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}" for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" done install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" - 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/muffon.sh b/muffon.sh index 535e395fa3ed..c77c53567639 100644 --- a/muffon.sh +++ b/muffon.sh @@ -1,10 +1,17 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron27 -APPDIR="/usr/lib/muffon" -export PATH="${APPDIR}:${PATH}" -_ASAR="${APPDIR}/app.asar" +#!/bin/sh +set -e +_APPDIR="/usr/lib/@appname@" +_ASAR="${_APPDIR}/@appasar@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export NODE_ENV=production if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" + exit else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" + exit fi
\ No newline at end of file |