summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-04-10 18:24:27 +0800
committerzxp198210052024-04-10 18:24:27 +0800
commit41c4e6bbd05b5fe1b3598f05d17008fbd551f26a (patch)
tree61754dd5e39223ba79d886eab68478269f384703
parent7218f9c2ddbbb1f82e08d5f2d54519d50f0968b2 (diff)
downloadaur-apifox-bin.tar.gz
fix errors
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD35
-rw-r--r--apifox.sh16
3 files changed, 23 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f9ef977dbe38..28674064c4e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,22 @@
pkgbase = apifox-bin
pkgdesc = Apifox=Postman+Swagger+Mock+JMeter.API 文档、API 调试、API Mock、API 自动化测试
pkgver = 2.5.12
- pkgrel = 1
+ pkgrel = 2
url = https://apifox.com/
arch = aarch64
arch = x86_64
license = LicenseRef-custom
- depends = electron22
- depends = hicolor-icon-theme
depends = java-runtime
depends = nodejs
+ depends = gtk3
+ depends = alsa-lib
provides = apifox=2.5.12
conflicts = apifox
options = !strip
source = LICENSE.html
- source = apifox.sh
sha256sums = 3884df6451dd5aaadc867c2b6882a7feabccb10c7e1df98e48e9fe2414c9fe19
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
source_aarch64 = apifox-2.5.12-aarch64.zip::https://cdn.apifox.cn/download/Apifox-linux-arm64-deb-latest.zip
- sha256sums_aarch64 = 379fb4d37f4fa27d025ee288614d8f179acb54b50aa96156791598aa13a517b5
+ sha256sums_aarch64 = bb0c9a302b6386c8aa966e2b794cee8a4387614661f5179a8685e3979bc37458
source_x86_64 = apifox-2.5.12-x86_64.zip::https://cdn.apifox.cn/download/Apifox-linux-deb-latest.zip
sha256sums_x86_64 = f838e4d7d2f3218f9f9cb5ba23b510c8c5105772031e046d20447fd32c6c4298
diff --git a/PKGBUILD b/PKGBUILD
index fd9be09ec87b..563c121b297b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=apifox-bin
_pkgname=Apifox
pkgver=2.5.12
_electronversion=22
-pkgrel=1
+pkgrel=2
pkgdesc="Apifox=Postman+Swagger+Mock+JMeter.API 文档、API 调试、API Mock、API 自动化测试"
arch=(
'aarch64'
@@ -15,10 +15,11 @@ license=('LicenseRef-custom')
conflicts=("${pkgname%-bin}")
provides=("${pkgname%-bin}=${pkgver}")
depends=(
- "electron${_electronversion}"
- 'hicolor-icon-theme'
+ #"electron${_electronversion}"
'java-runtime'
'nodejs'
+ 'gtk3'
+ 'alsa-lib'
)
options=(
'!strip'
@@ -27,26 +28,28 @@ source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.zip::https://cdn.apifox.cn/do
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::https://cdn.apifox.cn/download/${_pkgname}-linux-deb-latest.zip")
source=(
"LICENSE.html"
- "${pkgname%-bin}.sh"
+ #"${pkgname%-bin}.sh"
)
-sha256sums=('3884df6451dd5aaadc867c2b6882a7feabccb10c7e1df98e48e9fe2414c9fe19'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
-sha256sums_aarch64=('379fb4d37f4fa27d025ee288614d8f179acb54b50aa96156791598aa13a517b5')
+sha256sums=('3884df6451dd5aaadc867c2b6882a7feabccb10c7e1df98e48e9fe2414c9fe19')
+sha256sums_aarch64=('bb0c9a302b6386c8aa966e2b794cee8a4387614661f5179a8685e3979bc37458')
sha256sums_x86_64=('f838e4d7d2f3218f9f9cb5ba23b510c8c5105772031e046d20447fd32c6c4298')
build() {
- sed -e "s|@electronversion@|${_electronversion}|" \
- -e "s|@appname@|${pkgname%-bin}|g" \
- -e "s|@runname@|app.asar|g" \
- -e "s|@options@||g" \
- -i "${srcdir}/${pkgname%-bin}.sh"
+ #sed -e "s|@electronversion@|${_electronversion}|" \
+ # -e "s|@appname@|${pkgname%-bin}|g" \
+ # -e "s|@runname@|app.asar|g" \
+ # -e "s|@options@||g" \
+ # -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/${pkgname%-bin}_"*.deb
bsdtar -xf "${srcdir}/data."*
- sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g;s|Utility|Development|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin} --no-sandbox|g;s|Utility|Development|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
- install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
- install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
- cp -r "${srcdir}/opt/${_pkgname}/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
+ #install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ #install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ #cp -r "${srcdir}/opt/${_pkgname}/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm755 -d "${pkgdir}/"{opt/"${pkgname%-bin}",usr/bin}
+ cp -r "${srcdir}/opt/${_pkgname}/"* "${pkgdir}/opt/${pkgname%-bin}"
+ ln -sf "/opt/${pkgname%-bin}/${pkgname%-bin}" "${pkgdir}/usr/bin/${pkgname%-bin}"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
diff --git a/apifox.sh b/apifox.sh
deleted file mode 100644
index 7ddcaab8d734..000000000000
--- a/apifox.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/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