update to 1.1.12
This commit is contained in:
commit
cf9a636ae4
3 files changed
+123
No files matched your search
@@ -0,0 +1,23 @@
|
|||||||
|
pkgbase = stoat-desktop-bin
|
||||||
|
pkgdesc = Stoat for Desktop.(Prebuilt version.Use system-wide electron)
|
||||||
|
pkgver = 1.1.12
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://stoat.chat/
|
||||||
|
arch = aarch64
|
||||||
|
arch = x86_64
|
||||||
|
license = AGPL-3.0-only
|
||||||
|
makedepends = gendesk
|
||||||
|
depends = electron38
|
||||||
|
provides = stoat-desktop=1.1.12
|
||||||
|
conflicts = stoat-desktop
|
||||||
|
options = !emptydirs
|
||||||
|
source = stoat-desktop.png::https://raw.githubusercontent.com/stoatchat/assets/main/desktop/icon%403x.png
|
||||||
|
source = stoat-desktop.sh
|
||||||
|
sha256sums = bcd4ec4e912213d4c37da669837a2a0f26958c506a78f3f4737d3592837f065a
|
||||||
|
sha256sums = 31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6
|
||||||
|
source_aarch64 = stoat-desktop-1.1.12-aarch64.zip::https://github.com/stoatchat/for-desktop/releases/download/v1.1.12/Stoat-linux-arm64-1.1.12.zip
|
||||||
|
sha256sums_aarch64 = d5fd93f977abd813e6855756d814ad29b10f6255cd813f34565bf31aa83343c4
|
||||||
|
source_x86_64 = stoat-desktop-1.1.12-x86_64.zip::https://github.com/stoatchat/for-desktop/releases/download/v1.1.12/Stoat-linux-x64-1.1.12.zip
|
||||||
|
sha256sums_x86_64 = eabbdb9a84867669725d84bb1b7884ea752e2f82076c34ca5a249e6c0557ab6f
|
||||||
|
|
||||||
|
pkgname = stoat-desktop-bin
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
|
||||||
|
pkgname=stoat-desktop-bin
|
||||||
|
_pkgname=Stoat
|
||||||
|
pkgver=1.1.12
|
||||||
|
_electronversion=38
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Stoat for Desktop.(Prebuilt version.Use system-wide electron)"
|
||||||
|
arch=(
|
||||||
|
'aarch64'
|
||||||
|
'x86_64'
|
||||||
|
)
|
||||||
|
url="https://stoat.chat/"
|
||||||
|
_ghurl="https://github.com/stoatchat/for-desktop"
|
||||||
|
license=('AGPL-3.0-only')
|
||||||
|
provides=("${pkgname%-bin}=${pkgver}")
|
||||||
|
conflicts=("${pkgname%-bin}")
|
||||||
|
depends=(
|
||||||
|
"electron${_electronversion}"
|
||||||
|
)
|
||||||
|
makedepends=(
|
||||||
|
'gendesk'
|
||||||
|
)
|
||||||
|
options=(
|
||||||
|
'!emptydirs'
|
||||||
|
)
|
||||||
|
source=(
|
||||||
|
"${pkgname%-bin}.png::https://raw.githubusercontent.com/stoatchat/assets/main/desktop/icon%403x.png"
|
||||||
|
"${pkgname%-bin}.sh"
|
||||||
|
)
|
||||||
|
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.zip::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-linux-arm64-${pkgver}.zip")
|
||||||
|
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-linux-x64-${pkgver}.zip")
|
||||||
|
sha256sums=('bcd4ec4e912213d4c37da669837a2a0f26958c506a78f3f4737d3592837f065a'
|
||||||
|
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
|
||||||
|
sha256sums_aarch64=('d5fd93f977abd813e6855756d814ad29b10f6255cd813f34565bf31aa83343c4')
|
||||||
|
sha256sums_x86_64=('eabbdb9a84867669725d84bb1b7884ea752e2f82076c34ca5a249e6c0557ab6f')
|
||||||
|
_get_electron_version() {
|
||||||
|
_elec_ver="$(strings "${srcdir}/${_pkgname}-"*/"${pkgname%-bin}" | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1)"
|
||||||
|
echo -e "The electron version is: \033[1;31m${_elec_ver}\033[0m"
|
||||||
|
}
|
||||||
|
prepare() {
|
||||||
|
sed -i -e "
|
||||||
|
s/@electronversion@/${_electronversion}/g
|
||||||
|
s/@appname@/${pkgname%-bin}/g
|
||||||
|
s/@runname@/app.asar/g
|
||||||
|
s/@cfgdirname@/${pkgname%-bin}/g
|
||||||
|
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
|
||||||
|
" "${srcdir}/${pkgname%-bin}.sh"
|
||||||
|
_get_electron_version
|
||||||
|
gendesk -q -f -n \
|
||||||
|
--pkgname="${pkgname%-bin}" \
|
||||||
|
--pkgdesc="${pkgdesc}" \
|
||||||
|
--categories="Network" \
|
||||||
|
--name="${_pkgname}" \
|
||||||
|
--exec="${pkgname%-bin} %U"
|
||||||
|
}
|
||||||
|
package() {
|
||||||
|
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
|
||||||
|
install -Dm644 "${srcdir}/${_pkgname}-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-bin}"
|
||||||
|
install -Dm644 "${srcdir}/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
|
||||||
|
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
_APPDIR="/usr/lib/@appname@"
|
||||||
|
_RUNNAME="${_APPDIR}/@runname@"
|
||||||
|
_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 NODE_ENV=production
|
||||||
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
_FLAGS_FILE="${XDG_CONFIG_HOME}/@[email protected]"
|
||||||
|
declare -a flags
|
||||||
|
if [[ -f "${_FLAGS_FILE}" ]]; then
|
||||||
|
mapfile -t < "${_FLAGS_FILE}"
|
||||||
|
fi
|
||||||
|
for line in "${MAPFILE[@]}"; do
|
||||||
|
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
|
||||||
|
flags+=("${line}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
_WAYLAND_OPTION=false
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ "${arg}" == "--wayland" ]]; then
|
||||||
|
_WAYLAND_OPTION=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ "${_WAYLAND_OPTION}" == true ]]; then
|
||||||
|
echo "Forcing Wayland"
|
||||||
|
flags+=("--enable-features=UseOzonePlatform,WaylandWindowDecorations,VaapiVideoDecodeLinuxGL" "--ozone-platform=wayland")
|
||||||
|
fi
|
||||||
|
cd "${_APPDIR}"
|
||||||
|
if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
|
||||||
|
exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${flags[@]}" "$@" || exit $?
|
||||||
|
else
|
||||||
|
exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${flags[@]}" "$@" || exit $?
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user