summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-08-08 18:13:47 +0800
committerzxp198210052023-08-08 18:13:47 +0800
commitbe4e7eb09de4bc9bda31d61cc85b0515ad587297 (patch)
tree27b1dc846d484126a7fc06f47ec7cf694cdf5555
downloadaur-be4e7eb09de4bc9bda31d61cc85b0515ad587297.tar.gz
first release
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD31
-rw-r--r--structure.sh8
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4c0e39e15673
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = structure-bin
+ pkgdesc = A knowledge management tool
+ pkgver = 0.23.1
+ pkgrel = 1
+ url = https://structure.love/
+ arch = x86_64
+ license = AGPL3
+ depends = bash
+ depends = electron25
+ depends = hicolor-icon-theme
+ provides = structure-0.23.1
+ conflicts = structure
+ source = structure-0.23.1.AppImage::https://github.com/neopostmodern/structure/releases/download/v0.23.1/structure-0.23.1-linux-x86_64.AppImage
+ source = structure.sh
+ sha256sums = 4eed0d77b6506dac70078eecf8426aa81634250d1950e8d118435d09787dd2f6
+ sha256sums = b73b803447de6c815f1f9625c2eab112d8f4c7cad70f77c881c01b6bb26d7941
+
+pkgname = structure-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bd7ebb12c66c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=structure-bin
+pkgver=0.23.1
+pkgrel=1
+pkgdesc="A knowledge management tool"
+arch=('x86_64')
+url="https://structure.love/"
+_githuburl="https://github.com/neopostmodern/structure"
+license=('AGPL3')
+provides=("${pkgname%-bin}-${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=('bash' 'electron25' 'hicolor-icon-theme')
+source=("${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver}/${pkgname%-bin}-${pkgver}-linux-${CARCH}.AppImage"
+ "${pkgname%-bin}.sh")
+sha256sums=('4eed0d77b6506dac70078eecf8426aa81634250d1950e8d118435d09787dd2f6'
+ 'b73b803447de6c815f1f9625c2eab112d8f4c7cad70f77c881c01b6bb26d7941')
+prepare() {
+ chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
+ "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
+ cp -r "${srcdir}/squashfs-root/resources/"* "${pkgdir}/opt/${pkgname%-bin}"
+ for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024; do
+ install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
+ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
+ done
+ sed "s|AppRun --no-sandbox %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ find "${pkgdir}/opt/${pkgname%-bin}" -type d -exec chmod 755 {} \;
+} \ No newline at end of file
diff --git a/structure.sh b/structure.sh
new file mode 100644
index 000000000000..f78c5c23c2c8
--- /dev/null
+++ b/structure.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+_ELECTRON=/usr/bin/electron25
+_ASAR=/opt/structure/app.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