diff options
author | zxp19821005 | 2025-02-05 16:34:33 +0800 |
---|---|---|
committer | zxp19821005 | 2025-02-05 16:34:33 +0800 |
commit | a2c6913d71e593c027abf37e437e4970676c742e (patch) | |
tree | 8710c2a5197fde412f9274cbb0fbb4095ef28de3 | |
parent | f4859ead0d71fdcb99253bf4450937d521a92343 (diff) | |
download | aur-a2c6913d71e593c027abf37e437e4970676c742e.tar.gz |
update to 2.6.47
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | apifox.sh | 29 |
3 files changed, 66 insertions, 30 deletions
@@ -1,27 +1,26 @@ pkgbase = apifox-bin pkgdesc = Apifox=Postman+Swagger+Mock+JMeter(Prebuilt version).API 文档、API 调试、API Mock、API 自动化测试 - pkgver = 2.6.46 + pkgver = 2.6.47 pkgrel = 1 url = https://apifox.com/ arch = aarch64 arch = x86_64 license = LicenseRef-custom - depends = java-runtime - depends = nodejs - depends = gtk3 - depends = alsa-lib - depends = gtk2 + makedepends = fuse2 + depends = electron28 depends = libxcrypt-compat - depends = libdbusmenu-glib - depends = dbus-glib - provides = apifox=2.6.46 + depends = nodejs + depends = java-runtime + provides = apifox=2.6.47 conflicts = apifox options = !strip + source = apifox.sh source = LICENSE.html + sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980 sha256sums = 3884df6451dd5aaadc867c2b6882a7feabccb10c7e1df98e48e9fe2414c9fe19 - source_aarch64 = apifox-2.6.46-aarch64.zip::https://file-assets.apifox.com/download/Apifox-linux-arm64-latest.zip - sha256sums_aarch64 = f8d698b77f77a199f29c2b42f318ccf465a1edb7d965bb00dcb2e9392d49cd2b - source_x86_64 = apifox-2.6.46-x86_64.zip::https://file-assets.apifox.com/download/Apifox-linux-latest.zip - sha256sums_x86_64 = cd1ae7ef0d3af6722427488b0fd21ab57ee4aa8203907878da04d2bc0d47b6c2 + source_aarch64 = apifox-2.6.47-aarch64.zip::https://file-assets.apifox.com/download/Apifox-linux-arm64-latest.zip + sha256sums_aarch64 = 081987ac6422271580f52ebae89b5f7f8966d3adff526609db3f81f5ddff91aa + source_x86_64 = apifox-2.6.47-x86_64.zip::https://file-assets.apifox.com/download/Apifox-linux-latest.zip + sha256sums_x86_64 = b5c8a258dde0c6cd817f4029ec73f07b494dfbbedb04c2dbac4df7ac65b2a475 pkgname = apifox-bin @@ -1,8 +1,8 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=apifox-bin _pkgname=Apifox -pkgver=2.6.46 -_electronversion=22 +pkgver=2.6.47 +_electronversion=28 pkgrel=1 pkgdesc="Apifox=Postman+Swagger+Mock+JMeter(Prebuilt version).API 文档、API 调试、API Mock、API 自动化测试" arch=( @@ -15,39 +15,47 @@ license=('LicenseRef-custom') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - 'java-runtime' - 'nodejs' - 'gtk3' - 'alsa-lib' - 'gtk2' + "electron${_electronversion}" 'libxcrypt-compat' - 'libdbusmenu-glib' - 'dbus-glib' + 'nodejs' + 'java-runtime' +) +makedepends=( + 'fuse2' ) options=( '!strip' ) -source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.zip::https://file-assets.apifox.com/download/${_pkgname}-linux-arm64-latest.zip") -source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::https://file-assets.apifox.com/download/${_pkgname}-linux-latest.zip") source=( + "${pkgname%-bin}.sh" "LICENSE.html" ) -sha256sums=('3884df6451dd5aaadc867c2b6882a7feabccb10c7e1df98e48e9fe2414c9fe19') -sha256sums_aarch64=('f8d698b77f77a199f29c2b42f318ccf465a1edb7d965bb00dcb2e9392d49cd2b') -sha256sums_x86_64=('cd1ae7ef0d3af6722427488b0fd21ab57ee4aa8203907878da04d2bc0d47b6c2') +source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.zip::https://file-assets.apifox.com/download/${_pkgname}-linux-arm64-latest.zip") +source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::https://file-assets.apifox.com/download/${_pkgname}-linux-latest.zip") +sha256sums=('291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980' + '3884df6451dd5aaadc867c2b6882a7feabccb10c7e1df98e48e9fe2414c9fe19') +sha256sums_aarch64=('081987ac6422271580f52ebae89b5f7f8966d3adff526609db3f81f5ddff91aa') +sha256sums_x86_64=('b5c8a258dde0c6cd817f4029ec73f07b494dfbbedb04c2dbac4df7ac65b2a475') pkgver() { cd "${srcdir}/squashfs-root" grep "X-AppImage-Version" "${pkgname%-bin}.desktop" | sed "s/X-AppImage-Version=//g" } prepare() { + sed -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 + " -i "${srcdir}/${pkgname%-bin}.sh" "${srcdir}/${_pkgname}"*.AppImage --appimage-extract > /dev/null sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g" "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" find "${srcdir}/squashfs-root" -type d -perm 700 -exec chmod 755 {} \; } package() { - install -Dm755 -d "${pkgdir}/usr/"{lib/"${pkgname%-bin}",bin} - cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/"* "${pkgdir}/usr/lib/${pkgname%-bin}" - ln -sf "/usr/lib/${pkgname%-bin}/${pkgname%-bin}" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}" _icon_sizes=(16x16 32x32 48x48 64x64 128x128 256x256 512x512) for _icons in "${_icon_sizes[@]}";do install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \ diff --git a/apifox.sh b/apifox.sh new file mode 100644 index 000000000000..40e422ca2ee7 --- /dev/null +++ b/apifox.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -o pipefail +_APPDIR="/usr/lib/@appname@" +_RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" +_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 ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" +export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi +cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; } +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" +else + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" +fi
\ No newline at end of file |