diff options
author | zxp19821005 | 2023-08-03 16:49:58 +0800 |
---|---|---|
committer | zxp19821005 | 2023-08-03 16:49:58 +0800 |
commit | 4e444138a5248ee31593875f94bc854cb9ddb65b (patch) | |
tree | c45996c7b4bad8d3db87d29b544230e757f0b885 | |
download | aur-4e444138a5248ee31593875f94bc854cb9ddb65b.tar.gz |
first release
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | feidao.sh | 8 |
3 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..37fe123b4e9d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = feidao-bin + pkgdesc = 飞稻在线课程设计平台 + pkgver = 1.0.0 + pkgrel = 1 + url = https://www.fei-dao.com + arch = x86_64 + license = custom + depends = bash + depends = hicolor-icon-theme + depends = electron13 + provides = feidao + conflicts = feidao + source = feidao-1.0.0.AppImage::https://oss.fei-dao.com/resources/application/linux/feidao_latest.AppImage + source = feidao.sh + sha256sums = 2a5f5919ebc8c7ef8ebd232758852c87dd0b165208dc46a501ce3cefdd23ded7 + sha256sums = f83092477277004c1afb55eb5ba7389cecfc7ede0f78b6f6d943621ebf1cd32d + +pkgname = feidao-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1f3381b8e758 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=feidao-bin +pkgver=1.0.0 +pkgrel=1 +pkgdesc="飞稻在线课程设计平台" +arch=("x86_64") +url="https://www.fei-dao.com" +license=('custom') +depends=('bash' 'hicolor-icon-theme' 'electron13') +provides=("${pkgname%-bin}") +conflicts=("${pkgname%-bin}") +source=("${pkgname%-bin}-${pkgver}.AppImage::https://oss.fei-dao.com/resources/application/linux/${pkgname%-bin}_latest.AppImage" + "${pkgname%-bin}.sh") +sha256sums=('2a5f5919ebc8c7ef8ebd232758852c87dd0b165208dc46a501ce3cefdd23ded7' + 'f83092477277004c1afb55eb5ba7389cecfc7ede0f78b6f6d943621ebf1cd32d') +prepare() { + chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" + "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar" + sed "s|AppRun --no-sandbox %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" + install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" + for _icons in 16x16 24x24 32x32 48x48 128x128 256x256 1024x1024;do + install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \ + -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" + done + install -Dm644 "${srcdir}/squashfs-root/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
\ No newline at end of file diff --git a/feidao.sh b/feidao.sh new file mode 100644 index 000000000000..4d4fca8af20b --- /dev/null +++ b/feidao.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron13 +_ASAR="/opt/feidao/feidao.asar" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec ${_ELECTRON} ${_ASAR} "$@" +else + exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" +fi
\ No newline at end of file |