summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-11 17:31:03 +0800
committerzxp198210052023-12-11 17:31:03 +0800
commitefd8260c8752b572c62b4e17fd6e38f8401e6219 (patch)
treee0a426b4d767420f7f2b9f582530893f45fc783c
parentf94f68b0eb10d9f1ef1a125e5c1e039316ceea4b (diff)
downloadaur-efd8260c8752b572c62b4e17fd6e38f8401e6219.tar.gz
fix errors
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD31
-rw-r--r--certbox.sh14
3 files changed, 33 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7b642743caab..57ed76676109 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,14 +6,13 @@ pkgbase = certbox-bin
arch = aarch64
arch = x86_64
license = MIT
- depends = bash
depends = electron27
provides = certbox=1.7.2
conflicts = certbox
- source = LICENSE::https://raw.githubusercontent.com/tls-inspector/certbox/1.7.2/LICENSE
+ source = LICENSE-1.7.2::https://raw.githubusercontent.com/tls-inspector/certbox/1.7.2/LICENSE
source = certbox.sh
sha256sums = 86a899de0d14686c5fc2a444067323ed7162e88718b9d0b045653383b6059719
- sha256sums = fe94ec27ec8ce81ddcf7ee270c4d6cafbcc393e49b5ba525921f3e58455729f8
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
source_aarch64 = certbox-1.7.2-aarch64.deb::https://github.com/tls-inspector/certbox/releases/download/1.7.2/certbox_1.7.2_arm64.deb
sha256sums_aarch64 = 9b5eec564743883ec9fb82de9b1137764e9591771db91065f3dbab4b022a0b25
source_x86_64 = certbox-1.7.2-x86_64.deb::https://github.com/tls-inspector/certbox/releases/download/1.7.2/certbox_1.7.2_x64.deb
diff --git a/PKGBUILD b/PKGBUILD
index fd2b20301997..21d2d3a687d5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,42 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=certbox-bin
pkgver=1.7.2
+_electronversion=27
pkgrel=1
pkgdesc="A X.509 certificate toolbox on your desktop or in your browser. It allows you to easily generate entire certificate chains, issue certificates from existing roots, clone certificates, and more."
-arch=('aarch64' 'x86_64')
+arch=(
+ 'aarch64'
+ 'x86_64'
+)
url="https://certbox.io/"
-_githuburl="https://github.com/tls-inspector/certbox"
+_ghurl="https://github.com/tls-inspector/certbox"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
-depends=('bash' 'electron27')
-source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_githuburl}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_arm64.deb")
-source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_githuburl}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_x64.deb")
-source=("LICENSE::https://raw.githubusercontent.com/tls-inspector/certbox/${pkgver}/LICENSE"
+depends=(
+ "electron${_electronversion}"
+)
+source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_arm64.deb")
+source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_x64.deb")
+source=(
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/tls-inspector/certbox/${pkgver}/LICENSE"
"${pkgname%-bin}.sh")
sha256sums=('86a899de0d14686c5fc2a444067323ed7162e88718b9d0b045653383b6059719'
- 'fe94ec27ec8ce81ddcf7ee270c4d6cafbcc393e49b5ba525921f3e58455729f8')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
sha256sums_aarch64=('9b5eec564743883ec9fb82de9b1137764e9591771db91065f3dbab4b022a0b25')
sha256sums_x86_64=('9f35c5f4e3d3b5808b6bd2360262c4a282daa56be11262b315ec0d990c40173e')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.zst"
sed "s| %U||g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
- install -Dm755 -d "${pkgdir}/opt/${pkgname%-bin}/resources"
- cp -r "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${pkgdir}/opt/${pkgname%-bin}/resources"
+ install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -r "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/pixmaps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
- install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} \ No newline at end of file
diff --git a/certbox.sh b/certbox.sh
index fbfe9a1e60c1..2ec4412e5c4f 100644
--- a/certbox.sh
+++ b/certbox.sh
@@ -1,8 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron26
-_APPDIR="/opt/certbox/resources/app/"
+set -e
+_APPDIR="/usr/lib/@appname@"
+export PATH="${_APPDIR}:${PATH}"
+export ELECTRON_IS_DEV=0
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+_ASAR="${_APPDIR}/@appasar@"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_APPDIR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_APPDIR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file