summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD23
-rw-r--r--ficus.sh22
3 files changed, 32 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 32b2c0292895..922315329883 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ficus-bin
pkgdesc = A software for editing and managing markdown documents, developed by the gg=G team.
pkgver = 0.2.1
- pkgrel = 4
+ pkgrel = 5
url = https://ficus.world/
arch = x86_64
license = MIT
@@ -11,12 +11,12 @@ pkgbase = ficus-bin
conflicts = ficus
conflicts = ficus-desktop
source = ficus-0.2.1.asar::https://github.com/Thysrael/Ficus/releases/download/v0.2.1/app.asar
- source = https://raw.githubusercontent.com/Thysrael/Ficus/v0.2.1/LICENSE
- source = ficus.png::https://raw.githubusercontent.com/Thysrael/Ficus/v0.2.1/build/icon.png
+ source = LICENSE-0.2.1::https://raw.githubusercontent.com/Thysrael/Ficus/v0.2.1/LICENSE
+ source = ficus-0.2.1.png::https://raw.githubusercontent.com/Thysrael/Ficus/v0.2.1/build/icon.png
source = ficus.sh
sha256sums = fb3a407722baa7b48b81db2753ae12f47799a3a434122d47db8b320c6c4ba993
sha256sums = 062dfd6ae4c19f555ebbdba752598c98510837687393a38a3602b711890430d7
sha256sums = 3c8344b3daac5c775a3bf38518e5eee024566d7ea0a3f72c543a7c7ae13f72ef
- sha256sums = cf6a9a3f259d0760bd8ec9462c020294a11e930a1034956f8f8e9bb88aef128c
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
pkgname = ficus-bin
diff --git a/PKGBUILD b/PKGBUILD
index 5638da9bd1a8..4ae020fb2bd7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,42 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=ficus-bin
pkgver=0.2.1
-pkgrel=4
+_electronversion=13
+pkgrel=5
pkgdesc="A software for editing and managing markdown documents, developed by the gg=G team."
arch=('x86_64')
url="https://ficus.world/"
-_githuburl="https://github.com/Thysrael/Ficus"
+_ghurl="https://github.com/Thysrael/Ficus"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}" "${pkgname%-bin}-desktop")
depends=(
- 'electron13'
+ "electron${_electronversion}"
)
makedepends=(
'gendesk'
)
source=(
- "${pkgname%-bin}-${pkgver}.asar::${_githuburl}/releases/download/v${pkgver}/app.asar"
- "https://raw.githubusercontent.com/Thysrael/Ficus/v${pkgver}/LICENSE"
- "${pkgname%-bin}.png::https://raw.githubusercontent.com/Thysrael/Ficus/v${pkgver}/build/icon.png"
+ "${pkgname%-bin}-${pkgver}.asar::${_ghurl}/releases/download/v${pkgver}/app.asar"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/Thysrael/Ficus/v${pkgver}/LICENSE"
+ "${pkgname%-bin}-${pkgver}.png::https://raw.githubusercontent.com/Thysrael/Ficus/v${pkgver}/build/icon.png"
"${pkgname%-bin}.sh"
)
sha256sums=('fb3a407722baa7b48b81db2753ae12f47799a3a434122d47db8b320c6c4ba993'
'062dfd6ae4c19f555ebbdba752598c98510837687393a38a3602b711890430d7'
'3c8344b3daac5c775a3bf38518e5eee024566d7ea0a3f72c543a7c7ae13f72ef'
- 'cf6a9a3f259d0760bd8ec9462c020294a11e930a1034956f8f8e9bb88aef128c')
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
gendesk -q -f -n --categories "Utility" --name "Ficus" --exec "${pkgname%-bin}"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/${pkgname%-bin}-${pkgver}.asar" "${pkgdir}/usr/lib/${pkgname%-bin}/app.asar"
- install -Dm644 "${srcdir}/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
+ install -Dm644 "${srcdir}/${pkgname%-bin}-${pkgver}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
- 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/ficus.sh b/ficus.sh
index 9399ba771b1c..c77c53567639 100644
--- a/ficus.sh
+++ b/ficus.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron13
-APPDIR="/usr/lib/ficus"
-export PATH="${APPDIR}:${PATH}"
-#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+#!/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
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
+ exit
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ exit
fi \ No newline at end of file