summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-12 15:27:50 +0800
committerzxp198210052024-01-12 15:27:50 +0800
commit43dfcb9d4884a4318ff9950bb8a3343d204841e8 (patch)
treed48b8302f971be9b45759881e73e7887cefeb323
parent3225f03be9dee59d55be56b1c68fb319e9eb787d (diff)
downloadaur-43dfcb9d4884a4318ff9950bb8a3343d204841e8.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--aniship.sh22
3 files changed, 24 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 95bb2bf2dc8f..2fa288f8b539 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = aniship-bin
pkgdesc = A convenient and functional unofficial client that allows for easy viewing of anime on PCs and laptops.
pkgver = 0.0.4.2
- pkgrel = 4
+ pkgrel = 5
url = https://t.me/aniship
arch = x86_64
license = custom
@@ -12,6 +12,6 @@ pkgbase = aniship-bin
source = aniship-0.0.4.2.AppImage::https://github.com/progzone122/AniShip/releases/download/v0.0.4.2night/setup-0.0.4-2.AppImage
source = aniship.sh
sha256sums = 1fbe0e6388982d71268c4f4f04bf7c3f82ac0a6dee8310f8599d93be565525d2
- sha256sums = cddaabf4858314eee5ef72d0dbde9a89db52483e8ba51d1e799f4c6466034e6a
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = aniship-bin
diff --git a/PKGBUILD b/PKGBUILD
index 86ece3a012b8..58e2c1152142 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=aniship-bin
pkgver=0.0.4.2
-pkgrel=4
+_electronversion=16
+pkgrel=5
pkgdesc="A convenient and functional unofficial client that allows for easy viewing of anime on PCs and laptops."
arch=('x86_64')
url="https://t.me/aniship"
@@ -10,7 +11,7 @@ license=('custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron16'
+ "electron${_electronversion}"
)
makedepends=(
'squashfuse'
@@ -20,11 +21,15 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('1fbe0e6388982d71268c4f4f04bf7c3f82ac0a6dee8310f8599d93be565525d2'
- 'cddaabf4858314eee5ef72d0dbde9a89db52483e8ba51d1e799f4c6466034e6a')
+ '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"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
- sed -e "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" \
+ sed -e "s|AppRun --no-sandbox|${pkgname%-bin}|g" \
-e "s|Icon=${pkgname%-bin}-night|Icon=${pkgname%-bin}|g" \
-i "${srcdir}/squashfs-root/${pkgname%-bin}-night.desktop"
find "${srcdir}/squashfs-root/resources" -type d -perm 700 -exec chmod 755 {} \;
diff --git a/aniship.sh b/aniship.sh
index c58d8ae6198e..aacd8f895847 100644
--- a/aniship.sh
+++ b/aniship.sh
@@ -1,11 +1,15 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron16
-APPDIR=/usr/lib/aniship
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${APPDIR}/lib:${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