summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-10-11 18:59:34 +0800
committerzxp198210052023-10-11 18:59:34 +0800
commitc4631d6b3e1ea4282a38c6b00b6a79e15416eb61 (patch)
treeb20e4c6e64d95aca2053bbddf14ca08cd868ccaa
parentf01b109b2b6ac019bb768130a596457e8dba1be3 (diff)
downloadaur-c4631d6b3e1ea4282a38c6b00b6a79e15416eb61.tar.gz
fix errors
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD27
-rw-r--r--aniship.sh8
3 files changed, 29 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2df18f149987..7e4c104a2261 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
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 = 2
+ pkgrel = 3
url = https://t.me/aniship
arch = x86_64
license = custom
+ makedepends = squashfuse
+ makedepends = asar
depends = bash
depends = electron16
- depends = gcc-libs
- depends = glibc
provides = aniship=0.0.4.2
conflicts = aniship
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 = 5fb5356053631c4ac7ad2ab51f0f4738569d918b9c4407f7db64ba05d7be8896
+ sha256sums = 79c7eb23fcafd633fb357bc462ac457d781f027dfe1ccb55ee966dec94c32489
pkgname = aniship-bin
diff --git a/PKGBUILD b/PKGBUILD
index 7f80f4eb81bc..68dc0f7dd548 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=aniship-bin
pkgver=0.0.4.2
-pkgrel=2
+pkgrel=3
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"
@@ -9,21 +9,30 @@ _githuburl="https://github.com/progzone122/AniShip"
license=('custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
-depends=('bash' 'electron16' 'gcc-libs' 'glibc')
-source=("${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver}night/setup-0.0.4-2.AppImage"
+depends=('bash' 'electron16')
+makedepends=('squashfuse' 'asar')
+source=("${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver}night/setup-${pkgver//.2/-2}.AppImage"
"${pkgname%-bin}.sh")
sha256sums=('1fbe0e6388982d71268c4f4f04bf7c3f82ac0a6dee8310f8599d93be565525d2'
- '5fb5356053631c4ac7ad2ab51f0f4738569d918b9c4407f7db64ba05d7be8896')
-prepare() {
+ '79c7eb23fcafd633fb357bc462ac457d781f027dfe1ccb55ee966dec94c32489')
+build() {
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
+ asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked"
+ cp -r "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${srcdir}"
+ asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
+ sed -e "s|AppRun --no-sandbox %U|${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 {} \;
}
package() {
- install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
- cp -r "${srcdir}/squashfs-root/resources/"* "${pkgdir}/opt/${pkgname%-bin}"
- find "${pkgdir}/opt/${pkgname%-bin}" -type d -exec chmod 755 {} \;
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/opt/${pkgname%-bin}/resources"
+ cp -r "${srcdir}/squashfs-root/resources/sources" "${pkgdir}/opt/${pkgname%-bin}/resources"
+ install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/opt/${pkgname%-bin}/usr/lib"
+ install -Dm644 "${srcdir}/squashfs-root/swiftshader/"* -t "${pkgdir}/opt/${pkgname%-bin}/swiftshader"
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}-night.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
- sed "s|AppRun --no-sandbox %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g;s|Icon=${pkgname%-bin}-night|Icon=${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}-night.desktop"
install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}-night.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
install -Dm644 "${srcdir}/squashfs-root/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file
diff --git a/aniship.sh b/aniship.sh
index 0e683cbb3d76..9a5b5320ef3e 100644
--- a/aniship.sh
+++ b/aniship.sh
@@ -1,6 +1,12 @@
#!/bin/bash
_ELECTRON=/usr/bin/electron16
-_ASAR="/opt/aniship/app.asar"
+APPDIR="/opt/aniship"
+export PATH="${APPDIR}:${APPDIR}/usr/sbin:${PATH}"
+export XDG_DATA_DIRS="./share/:/usr/share/gnome:/usr/local/share/:/usr/share/:${XDG_DATA_DIRS}"
+export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
+export XDG_DATA_DIRS="${APPDIR}"/usr/share/:"${XDG_DATA_DIRS}":/usr/share/gnome/:/usr/local/share/:/usr/share/
+export GSETTINGS_SCHEMA_DIR="${APPDIR}/usr/share/glib-2.0/schemas:${GSETTINGS_SCHEMA_DIR}"
+_ASAR="${APPDIR}/resources/app.asar"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
exec ${_ELECTRON} ${_ASAR} "$@"
else