summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-07-28 17:53:50 +0800
committerzxp198210052023-07-28 17:53:50 +0800
commite2e0271d8408b189d53dc99342bd30ac8c779229 (patch)
treee636dc34a85aa5d49c146d984788086529e89d51
parent6ba657ed225cca5530a65a2ae757f162e931296a (diff)
downloadaur-e2e0271d8408b189d53dc99342bd30ac8c779229.tar.gz
optimized PKGBUILD
-rw-r--r--.SRCINFO37
-rw-r--r--PKGBUILD23
-rw-r--r--yana.sh8
3 files changed, 30 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 823436a433bf..4bea34200ebc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,44 +1,21 @@
pkgbase = yana-bin
pkgdesc = Powerful note-taking app with nested documents, full-text search, rich-text editor, code snippet editor and more
pkgver = 1.0.16
- pkgrel = 2
+ pkgrel = 3
url = https://yana.js.org/
arch = x86_64
license = MIT
- depends = gtk3
- depends = nss
- depends = alsa-lib
- depends = at-spi2-core
- depends = pango
- depends = glibc
- depends = libcups
- depends = dbus
- depends = glib2
- depends = gcc-libs
- depends = libxi
- depends = libxcursor
- depends = libxrandr
- depends = gdk-pixbuf2
- depends = libxcomposite
+ depends = bash
+ depends = electron10
depends = hicolor-icon-theme
- depends = libx11
- depends = libdrm
- depends = expat
- depends = libxrender
- depends = cairo
- depends = nspr
- depends = mesa
- depends = libxdamage
- depends = libxfixes
- depends = libxcb
- depends = libxext
- depends = libxtst
provides = yana
conflicts = yana
conflicts = yana-appimage
source = yana-1.0.16_amd64.deb::https://github.com/lukasbach/yana/releases/download/v1.0.16/yana_1.0.16_amd64.deb
- source = LICENSE::https://github.com/lukasbach/yana/raw/master/LICENSE
+ source = LICENSE::https://raw.githubusercontent.com/lukasbach/yana/master/LICENSE
+ source = yana.sh
sha256sums = 00d2f30dad0342fa59fa228f087bf647cf2fa6fe061aa46ede22a5439d5c23b8
- sha256sums = ebb422a6231ddde433e1d601377c455aefcc96cdc27662bd3ce07d08f1110152
+ sha256sums = d51fa4278a4f3a6871df2e45a74a3a242f253b21e1ed655f7117d5dd45570a32
+ sha256sums = 546e75b9012146cc72160fcd777d69ba3dd220bdd2c7178005c67f9d55617d3c
pkgname = yana-bin
diff --git a/PKGBUILD b/PKGBUILD
index 22410af1bfc0..e0cc27f23d12 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,31 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname="yana-bin"
pkgver=1.0.16
-pkgrel=2
+pkgrel=3
pkgdesc="Powerful note-taking app with nested documents, full-text search, rich-text editor, code snippet editor and more"
arch=("x86_64")
url="https://yana.js.org/"
_githuburl="https://github.com/lukasbach/yana"
license=('MIT')
-depends=('gtk3' 'nss' 'alsa-lib' 'at-spi2-core' 'pango' 'glibc' 'libcups' 'dbus' 'glib2' 'gcc-libs' 'libxi' \
- 'libxcursor' 'libxrandr' 'gdk-pixbuf2' 'libxcomposite' 'hicolor-icon-theme' 'libx11' 'libdrm' 'expat' \
- 'libxrender' 'cairo' 'nspr' 'mesa' 'libxdamage' 'libxfixes' 'libxcb' 'libxext' 'libxtst')
+depends=('bash' 'electron10' 'hicolor-icon-theme')
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}" "${pkgname%-bin}-appimage")
source=(
"${pkgname%-bin}-${pkgver}_amd64.deb::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
- "LICENSE::${_githuburl}/raw/master/LICENSE")
+ "LICENSE::https://raw.githubusercontent.com/lukasbach/yana/master/LICENSE"
+ "${pkgname%-bin}.sh")
sha256sums=('00d2f30dad0342fa59fa228f087bf647cf2fa6fe061aa46ede22a5439d5c23b8'
- 'ebb422a6231ddde433e1d601377c455aefcc96cdc27662bd3ce07d08f1110152')
-
+ 'd51fa4278a4f3a6871df2e45a74a3a242f253b21e1ed655f7117d5dd45570a32'
+ '546e75b9012146cc72160fcd777d69ba3dd220bdd2c7178005c67f9d55617d3c')
package() {
- bsdtar -xvf data.tar.xz -C "${pkgdir}"
+ bsdtar -xf data.tar.xz
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/opt/Yana/resources/app.asar" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar"
+ sed "s|/opt/Yana/yana %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do
+ install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
+ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
+ done
install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file
diff --git a/yana.sh b/yana.sh
new file mode 100644
index 000000000000..aa388da43995
--- /dev/null
+++ b/yana.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+_ELECTRON=/usr/bin/electron10
+_ASAR="/opt/yana/yana.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