summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-27 20:34:23 +0800
committerzxp198210052023-12-27 20:34:23 +0800
commit4bb529dd3ec0a95394fa7ac3a4a40740d4770b92 (patch)
treec83872a811672fdf33905f33a4ead7e39050748d
parentcbaf7a40076b1ea27e61941ee4996b74da803d19 (diff)
downloadaur-4bb529dd3ec0a95394fa7ac3a4a40740d4770b92.tar.gz
fix errors
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD42
-rw-r--r--geekeditor.sh17
3 files changed, 37 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 360e52fd7415..cca42b7e077e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,35 +1,18 @@
pkgbase = geekeditor-bin
pkgdesc = Immersive efficiency writing editor.极客编辑器是一款所见即所得(WYSIWYG)富文本沉浸式写作排版编辑器,注重高效创作,可多开文档编辑,同时支持Markdown语法输入及一键排版
pkgver = 1.4.9
- pkgrel = 6
+ pkgrel = 7
url = https://www.geekeditor.com/
arch = x86_64
license = GPL3
- depends = alsa-lib
- depends = gtk3
- depends = at-spi2-core
- depends = nss
- depends = libxfixes
- depends = libdrm
- depends = mesa
- depends = libxrandr
- depends = libxcomposite
- depends = nspr
- depends = libxext
- depends = cairo
- depends = expat
- depends = gdk-pixbuf2
- depends = libx11
- depends = libxcb
- depends = pango
- depends = libxdamage
- depends = dbus
- depends = libcups
+ depends = electron11
depends = hicolor-icon-theme
- depends = libxkbcommon
+ depends = nodejs
provides = geekeditor=1.4.9
conflicts = geekeditor
source = geekeditor-1.4.9.deb::https://github.com/geekeditor/geekeditor-releases/releases/download/v1.4.9/geekeditor_1.4.9_amd64.deb
+ source = geekeditor.sh
sha256sums = 99c69e953535adffd4edda3932d3f12acb206f104de3dddb15a04b656fda1a1a
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
pkgname = geekeditor-bin
diff --git a/PKGBUILD b/PKGBUILD
index c283496f225d..77b5bf042efd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
pkgname=geekeditor-bin
_pkgname=GeekEditor
pkgver=1.4.9
-pkgrel=6
+_electronversion=11
+pkgrel=7
pkgdesc="Immersive efficiency writing editor.极客编辑器是一款所见即所得(WYSIWYG)富文本沉浸式写作排版编辑器,注重高效创作,可多开文档编辑,同时支持Markdown语法输入及一键排版"
arch=('x86_64')
url=https://www.geekeditor.com/
@@ -11,42 +12,29 @@ license=('GPL3')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'alsa-lib'
- 'gtk3'
- 'at-spi2-core'
- 'nss'
- 'libxfixes'
- 'libdrm'
- 'mesa'
- 'libxrandr'
- 'libxcomposite'
- 'nspr'
- 'libxext'
- 'cairo'
- 'expat'
- 'gdk-pixbuf2'
- 'libx11'
- 'libxcb'
- 'pango'
- 'libxdamage'
- 'dbus'
- 'libcups'
+ "electron${_electronversion}"
'hicolor-icon-theme'
- 'libxkbcommon'
+ 'nodejs'
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
+ "${pkgname%-bin}.sh"
)
-sha256sums=('99c69e953535adffd4edda3932d3f12acb206f104de3dddb15a04b656fda1a1a')
+sha256sums=('99c69e953535adffd4edda3932d3f12acb206f104de3dddb15a04b656fda1a1a'
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.xz"
- sed "s|/opt/${_pkgname}/${_pkgname}|${pkgname%-bin} --no-sandbox|g;s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g;s|Writing Editor|Office|g" \
+ sed "s|/opt/${_pkgname}/${_pkgname}|${pkgname%-bin}|g;s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g;s|Writing Editor|Office|g" \
-i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
}
package() {
- install -Dm755 -d "${pkgdir}/"{opt/"${pkgname%-bin}",usr/bin}
- cp -r "${srcdir}/opt/${_pkgname}/"* "${pkgdir}/opt/${pkgname%-bin}"
- ln -sf "/opt/${pkgname%-bin}/${_pkgname}" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -r "${srcdir}/opt/${_pkgname}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \
diff --git a/geekeditor.sh b/geekeditor.sh
new file mode 100644
index 000000000000..c77c53567639
--- /dev/null
+++ b/geekeditor.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
+ exit
+else
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ exit
+fi \ No newline at end of file