diff options
author | zxp19821005 | 2023-07-21 15:06:08 +0800 |
---|---|---|
committer | zxp19821005 | 2023-07-21 15:06:08 +0800 |
commit | f1377dc21e1a6321a02699d4567481b91321096b (patch) | |
tree | 8a03bcf2051446c8d566de38ec8e1ae7e5e35558 | |
download | aur-f1377dc21e1a6321a02699d4567481b91321096b.tar.gz |
first release
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | thinreports-section-editor.sh | 8 |
3 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ef4659a5c736 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = thinreports-section-editor-bin + pkgdesc = A template editor for Thinreports to edit Section Format templates + pkgver = 1.0.0_dev + pkgrel = 1 + url = https://github.com/thinreports/thinreports + arch = x86_64 + license = MIT + depends = bash + depends = electron21 + depends = hicolor-icon-theme + conflicts = thinreports-section-editor + source = thinreports-section-editor-1.0.0_dev.AppImage::https://github.com/thinreports/thinreports-section-editor/releases/download/v1.0.0-dev/thinreports-section-editor-1.0.0-dev-linux-20221031-0b5119.AppImage + source = LICENSE::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/main/LICENSE + source = thinreports-section-editor.sh + sha256sums = 818e3b1fdf4fb1ed1fdbe47cc58a034074a652577a887b168edfb033f47b6aeb + sha256sums = 2d416fa05a32860094f618f477a982dd77676b236dc710f2a4df289b7e43ae0c + sha256sums = 658588bf0e8ddebb7e2010fd9f840811489ea33b86ded200a5b72df10ac913c8 + +pkgname = thinreports-section-editor-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7cfce8fca85b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=thinreports-section-editor-bin +pkgver=1.0.0_dev +pkgrel=1 +pkgdesc="A template editor for Thinreports to edit Section Format templates" +arch=('x86_64') +url="https://github.com/thinreports/thinreports" +_githuburl="https://github.com/thinreports/thinreports-section-editor" +license=('MIT') +conflicts=("${pkgname%-bin}") +depends=('bash' 'electron21' 'hicolor-icon-theme') +source=("${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver//_/-}/${pkgname%-bin}-${pkgver//_/-}-linux-20221031-0b5119.AppImage" + "LICENSE::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/main/LICENSE" + "${pkgname%-bin}.sh") +sha256sums=('818e3b1fdf4fb1ed1fdbe47cc58a034074a652577a887b168edfb033f47b6aeb' + '2d416fa05a32860094f618f477a982dd77676b236dc710f2a4df289b7e43ae0c' + '658588bf0e8ddebb7e2010fd9f840811489ea33b86ded200a5b72df10ac913c8') +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}" + install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar" + 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" -t "${pkgdir}/usr/share/applications" + install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
\ No newline at end of file diff --git a/thinreports-section-editor.sh b/thinreports-section-editor.sh new file mode 100644 index 000000000000..2abaefe72bce --- /dev/null +++ b/thinreports-section-editor.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron21 +_ASAR="/opt/thinreports-section-editor/thinreports-section-editor.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 |