diff options
author | zxp19821005 | 2023-08-04 14:05:40 +0800 |
---|---|---|
committer | zxp19821005 | 2023-08-04 14:05:40 +0800 |
commit | 5067bc2dcd9b6377ec6ceb3f3b5127e4dcfb03c0 (patch) | |
tree | 3459dc4d0ff3f9dcb8016a6655d1206874008b6f | |
parent | c1b37ff8ff19e57dba20ae76372fb8321ebc6de5 (diff) | |
download | aur-5067bc2dcd9b6377ec6ceb3f3b5127e4dcfb03c0.tar.gz |
optimized PKGBUILD
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | glyphr-studio-desktop.sh | 8 |
3 files changed, 28 insertions, 17 deletions
@@ -1,18 +1,18 @@ pkgbase = glyphr-studio-desktop-bin pkgdesc = A desktop client for Glyphr Studio built in electron.Glyphr Studio is a free, web based font designer. pkgver = 0.5.6 - pkgrel = 1 + pkgrel = 2 url = https://www.glyphrstudio.com/ arch = x86_64 license = GPL3 - depends = libxss - depends = at-spi2-core - depends = gtk3 - depends = alsa-lib - depends = nss + depends = bash + depends = electron9 provides = glyphr-studio conflicts = glyphr-studio-desktop + conflicts = glyphr-studio source = glyphr-studio-desktop-0.5.6.deb::https://github.com/glyphr-studio/Glyphr-Studio-Desktop/releases/download/v0.5.6/glyphr-studio-desktop_0.5.6_amd64.deb + source = glyphr-studio-desktop.sh sha256sums = ebdd7da4928699cf083c88417b5f105932cdf382f52f12205749a10f9d744097 + sha256sums = 9ae082066ba60c5aa2c7ebae1830216394e26c7d879e0c6b22d06fe45395d19e pkgname = glyphr-studio-desktop-bin @@ -1,21 +1,24 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=glyphr-studio-desktop-bin -_pkgname=glyphr-studio-desktop +_appname="Glyphr Studio" pkgver=0.5.6 -pkgrel=1 +pkgrel=2 pkgdesc="A desktop client for Glyphr Studio built in electron.Glyphr Studio is a free, web based font designer." arch=("x86_64") url="https://www.glyphrstudio.com/" _githuburl="https://github.com/glyphr-studio/Glyphr-Studio-Desktop" license=('GPL3') -depends=(libxss at-spi2-core gtk3 alsa-lib nss) -options=() -optdepends=() -provides=("glyphr-studio") -conflicts=('glyphr-studio-desktop') -source=("${_pkgname}-${pkgver}.deb::${_githuburl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_amd64.deb") -sha256sums=('ebdd7da4928699cf083c88417b5f105932cdf382f52f12205749a10f9d744097') +depends=('bash' 'electron9') +provides=("${pkgname%-desktop-bin}") +conflicts=("${pkgname%-bin}" "${pkgname%-desktop-bin}") +source=("${pkgname%-bin}-${pkgver}.deb::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb" + "${pkgname%-bin}.sh") +sha256sums=('ebdd7da4928699cf083c88417b5f105932cdf382f52f12205749a10f9d744097' + '9ae082066ba60c5aa2c7ebae1830216394e26c7d879e0c6b22d06fe45395d19e') package() { - bsdtar -xf data.tar.xz -C "${pkgdir}" - install -Dm644 "${pkgdir}/usr/share/icons/hicolor/0x0/apps/${_pkgname}.png" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_pkgname}.png" + bsdtar -xf "${srcdir}/data.tar.xz" + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}" + install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar" + sed "s|\"/opt/${_appname}/${pkgname%-bin}\" %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" + install -Dm644 "${srcdir}/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" }
\ No newline at end of file diff --git a/glyphr-studio-desktop.sh b/glyphr-studio-desktop.sh new file mode 100644 index 000000000000..6c3a3071a913 --- /dev/null +++ b/glyphr-studio-desktop.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron9 +_ASAR="/opt/glyphr-studio-desktop/glyphr-studio-desktop.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 |