diff options
author | zxp19821005 | 2024-01-10 17:17:10 +0800 |
---|---|---|
committer | zxp19821005 | 2024-01-10 17:17:10 +0800 |
commit | 4b389ca063b89b702fa4cc0a1fb891c7d619e70e (patch) | |
tree | 45693f3f5954bcd42da0cebcdbd2a571a41342f0 | |
parent | 8b062635bf270357ce3c613d4c98d3d89d1e943c (diff) | |
download | aur-4b389ca063b89b702fa4cc0a1fb891c7d619e70e.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | whalebird.sh | 22 |
3 files changed, 24 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = whalebird-bin pkgdesc = An Electron based Mastodon, Pleroma, and Misskey client pkgver = 5.1.1 - pkgrel = 2 + pkgrel = 3 url = https://whalebird.social/ arch = x86_64 license = GPL3 @@ -11,6 +11,6 @@ pkgbase = whalebird-bin source = whalebird-5.1.1.deb::https://github.com/h3poteto/whalebird-desktop/releases/download/v5.1.1/Whalebird-5.1.1-linux-amd64.deb source = whalebird.sh sha256sums = 556acfb66a0f37d7be1b838c37aa371228efd3655c6d212ac2ecd5749c9ec57a - sha256sums = 7923440bf061d75d34e967f7f5ac538c0686ab0c23b2f522c8c6276ec823b36b + sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231 pkgname = whalebird-bin @@ -5,7 +5,8 @@ pkgname=whalebird-bin _pkgname=Whalebird pkgver=5.1.1 -pkgrel=2 +_electronversion=22 +pkgrel=3 pkgdesc="An Electron based Mastodon, Pleroma, and Misskey client" arch=('x86_64') url="https://whalebird.social/" @@ -14,17 +15,21 @@ license=('GPL3') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'electron22' + "electron${_electronversion}" ) source=( "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-amd64.deb" "${pkgname%-bin}.sh" ) sha256sums=('556acfb66a0f37d7be1b838c37aa371228efd3655c6d212ac2ecd5749c9ec57a' - '7923440bf061d75d34e967f7f5ac538c0686ab0c23b2f522c8c6276ec823b36b') + 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231') build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -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}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" + sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" diff --git a/whalebird.sh b/whalebird.sh index 2f5f6e4a16ab..aacd8f895847 100644 --- a/whalebird.sh +++ b/whalebird.sh @@ -1,11 +1,15 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron22 -APPDIR="/usr/lib/whalebird" -export PATH="${APPDIR}:${PATH}" -#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_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 +cd "${_APPDIR}" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + exec electron@electronversion@ "${_ASAR}" "$@" else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" -fi
\ No newline at end of file + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" +fi +exit
\ No newline at end of file |