diff options
author | zxp19821005 | 2024-04-06 22:27:57 +0800 |
---|---|---|
committer | zxp19821005 | 2024-04-06 22:27:57 +0800 |
commit | 37fcd5829eef33968df46895f269bc04d322abc6 (patch) | |
tree | f1a76582c18ba95a97f0105d24e47dd16d965440 | |
download | aur-37fcd5829eef33968df46895f269bc04d322abc6.tar.gz |
update to 2.0.3
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | animeclient.sh | 16 |
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7d82c7f40765 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = animeclient-bin + pkgdesc = An application that brings together several anime streaming platforms + pkgver = 2.0.3 + pkgrel = 1 + url = https://zvbt.github.io/AnimeClient/ + arch = x86_64 + license = MIT + makedepends = fuse2 + makedepends = asar + makedepends = npm + depends = electron28 + provides = animeclient=2.0.3 + conflicts = animeclient + source = animeclient-2.0.3.AppImage::https://github.com/zvbt/AnimeClient/releases/download/v2.0.3/AnimeClient-2.0.3.AppImage + source = LICENSE-2.0.3::https://raw.githubusercontent.com/zvbt/AnimeClient/v2.0.3/LICENSE + source = animeclient.sh + sha256sums = 0aca58db2d565ccdb42e493068d19068a551681fa3b6863b59ac17d489a14e07 + sha256sums = ffc59750487e679e55e98c059d8d61c3c5f11eab0d297c34581db22c07cdf27d + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + +pkgname = animeclient-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..948503e38b88 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=animeclient-bin +_pkgname=AnimeClient +pkgver=2.0.3 +_electronversion=28 +pkgrel=1 +pkgdesc="An application that brings together several anime streaming platforms" +arch=('x86_64') +url="https://zvbt.github.io/AnimeClient/" +_ghurl="https://github.com/zvbt/AnimeClient" +license=('MIT') +provides=("${pkgname%-bin}=${pkgver}") +conflicts=("${pkgname%-bin}") +depends=( + "electron${_electronversion}" +) +makedepends=( + 'fuse2' + 'asar' + 'npm' +) +source=( + "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/zvbt/AnimeClient/v${pkgver}/LICENSE" + "${pkgname%-bin}.sh" +) +sha256sums=('0aca58db2d565ccdb42e493068d19068a551681fa3b6863b59ac17d489a14e07' + 'ffc59750487e679e55e98c059d8d61c3c5f11eab0d297c34581db22c07cdf27d' + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@runname@|app.asar|g" \ + -e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" + chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" + "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null + sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" + asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked" + if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then + export npm_config_registry=https://registry.npmmirror.com + export npm_config_electron_mirror=https://registry.npmmirror.com/-/binary/electron/ + export npm_config_electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/ + else + echo "Your network is OK." + fi + cd "${srcdir}/app.asar.unpacked" + npm add discord-rpc + sed "s|logo.ico|logo.png|g" -i index.js + asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar" +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib" + install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" + install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}
\ No newline at end of file diff --git a/animeclient.sh b/animeclient.sh new file mode 100644 index 000000000000..7ddcaab8d734 --- /dev/null +++ b/animeclient.sh @@ -0,0 +1,16 @@ +#!/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 NODE_ENV=production +cd "${_APPDIR}" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +else + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? +fi
\ No newline at end of file |