summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-07-21 16:19:48 +0800
committerzxp198210052023-07-21 16:19:48 +0800
commit7f2a5a0d3e1b47c5b6609595cd9d39d5e5dde644 (patch)
treecad3c11cb4ad3de6a9dde953b8d817112a17c723
parent117699b726442b0a4cd16179a9175ffe888a56a2 (diff)
downloadaur-7f2a5a0d3e1b47c5b6609595cd9d39d5e5dde644.tar.gz
optimized PKGBUILD
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD24
-rw-r--r--translationcore.sh8
3 files changed, 29 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8c5aab6c0d83..df6618ab595a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,39 +1,21 @@
pkgbase = translationcore-bin
pkgdesc = An open source platform for checking and managing Bible translation projects
pkgver = 3.4.0lite
- pkgrel = 1
+ pkgrel = 2
url = https://www.translationcore.com/
arch = x86_64
license = ISC
- depends = nss
- depends = pango
- depends = gdk-pixbuf2
- depends = alsa-lib
- depends = libxcb
- depends = libxdamage
- depends = glibc
- depends = cairo
- depends = nspr
- depends = libcups
- depends = libxfixes
- depends = libxkbcommon
- depends = at-spi2-core
- depends = libxrandr
- depends = expat
+ makedepends = asar
+ depends = bash
+ depends = electron17
depends = hicolor-icon-theme
- depends = gtk3
- depends = glib2
- depends = libdrm
- depends = libxext
- depends = dbus
- depends = mesa
- depends = gcc-libs
- depends = libxcomposite
- depends = libx11
+ provides = translationcore
conflicts = translationcore
source = translationcore-3.4.0lite.deb::https://github.com/unfoldingWord/translationCore/releases/download/v3.4.0-LITE/tC-linux-x64-3.4.0-LITE-5b601bd.deb
source = LICENSE::https://raw.githubusercontent.com/unfoldingWord/translationCore/develop/LICENSE
+ source = translationcore.sh
sha256sums = 171ce1a32db7b30464a3d4b9296a4cefa6f789f8c6873b7964f9058da1231434
sha256sums = a756bd73c46e3e9b85ff0222658f4c63851ebc5af63811adc4333ff618688417
+ sha256sums = 3aa6edb1f5a12939f6b8ac380d8762ac18b7186e14f0dfb9d61d57c13f2f317f
pkgname = translationcore-bin
diff --git a/PKGBUILD b/PKGBUILD
index c80f7617a064..e86ebbd0f167 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,26 +2,30 @@
pkgname="translationcore-bin"
pkgver=3.4.0lite
_pkgver=3.4.0-LITE
-pkgrel=1
+pkgrel=2
pkgdesc="An open source platform for checking and managing Bible translation projects"
arch=('x86_64')
url="https://www.translationcore.com/"
_githuburl="https://github.com/unfoldingWord/translationCore"
license=('ISC')
+provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}")
-depends=('nss' 'pango' 'gdk-pixbuf2' 'alsa-lib' 'libxcb' 'libxdamage' 'glibc' 'cairo' 'nspr' 'libcups' 'libxfixes' 'libxkbcommon' 'at-spi2-core' \
- 'libxrandr' 'expat' 'hicolor-icon-theme' 'gtk3' 'glib2' 'libdrm' 'libxext' 'dbus' 'mesa' 'gcc-libs' 'libxcomposite' 'libx11')
+depends=('bash' 'electron17' 'hicolor-icon-theme')
+makedepends=('asar')
source=("${pkgname%-bin}-${pkgver}.deb::${_githuburl}/releases/download/v${_pkgver}/tC-linux-x64-${_pkgver}-5b601bd.deb"
- "LICENSE::https://raw.githubusercontent.com/unfoldingWord/translationCore/develop/LICENSE")
+ "LICENSE::https://raw.githubusercontent.com/unfoldingWord/translationCore/develop/LICENSE"
+ "${pkgname%-bin}.sh")
sha256sums=('171ce1a32db7b30464a3d4b9296a4cefa6f789f8c6873b7964f9058da1231434'
- 'a756bd73c46e3e9b85ff0222658f4c63851ebc5af63811adc4333ff618688417')
-
+ 'a756bd73c46e3e9b85ff0222658f4c63851ebc5af63811adc4333ff618688417'
+ '3aa6edb1f5a12939f6b8ac380d8762ac18b7186e14f0dfb9d61d57c13f2f317f')
package() {
- bsdtar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}"
- sed "s|unfoldingword-${pkgname%-bin}|${pkgname%-bin}|g" -i "${pkgdir}/opt/${pkgname%-bin}/unfoldingword-${pkgname%-bin}.desktop"
- install -Dm644 "${pkgdir}/opt/${pkgname%-bin}/unfoldingword-${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ bsdtar -xf "${srcdir}/data.tar.xz"
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
+ asar pack "${srcdir}/opt/${pkgname%-bin}/resources/app" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar"
+ sed "s|unfoldingword-${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/opt/${pkgname%-bin}/unfoldingword-${pkgname%-bin}.desktop"
+ install -Dm644 "${srcdir}/opt/${pkgname%-bin}/unfoldingword-${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
for _icons in 16 22 32 48 64 128;do
- install -Dm644 "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}-${_icons}.png" "${pkgdir}/usr/share/icons/hicolor/${_icons}x${_icons}/apps/${pkgname%-bin}.png"
+ install -Dm644 "${srcdir}/opt/${pkgname%-bin}/${pkgname%-bin}-${_icons}.png" "${pkgdir}/usr/share/icons/hicolor/${_icons}x${_icons}/apps/${pkgname%-bin}.png"
done
install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file
diff --git a/translationcore.sh b/translationcore.sh
new file mode 100644
index 000000000000..1a9c4f3d1e27
--- /dev/null
+++ b/translationcore.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+_ELECTRON=/usr/bin/electron17
+_ASAR="/opt/translationcore/translationcore.asar"
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ exec ${_ELECTRON} ${_ASAR} "$@"
+else
+ exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+fi \ No newline at end of file