diff options
author | zxp19821005 | 2023-08-19 12:41:15 +0800 |
---|---|---|
committer | zxp19821005 | 2023-08-19 12:41:15 +0800 |
commit | 5ed642c68135436c7896096580c533c5e0e2077e (patch) | |
tree | 042d94dcf80931d9ef3a1252b2251344062ce01f | |
download | aur-5ed642c68135436c7896096580c533c5e0e2077e.tar.gz |
first release
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | code-notes.sh | 8 |
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dfafdedd3d66 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = code-notes-bin + pkgdesc = A simple code snippet & gist manager for developers built with Electron & Vue.js + pkgver = 1.2.4 + pkgrel = 1 + url = https://lauthieb.github.io/code-notes + arch = x86_64 + license = MIT + depends = bash + depends = electron8 + provides = code-notes=1.2.4 + conflicts = code-notes + source = code-notes-1.2.4.AppImage::https://github.com/lauthieb/code-notes/releases/download/1.2.4/code-notes-1.2.4-x86_64.AppImage + source = LICENSE::https://raw.githubusercontent.com/lauthieb/code-notes/master/LICENSE + source = code-notes.sh + sha256sums = 45262ac6118071ec68a750eff6dd5ab7578bbff870a03403a32fa46935b5c47c + sha256sums = d292c9f2252858356efe3e4f88cdb6052756a2708ffe12ecb579b7731469ca76 + sha256sums = 5c32a43d7bed600bc560ed5a05d3e31cbe37ae52e657758550e5f1fa7f2210b8 + +pkgname = code-notes-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1d2ea2b7812b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=code-notes-bin +pkgver=1.2.4 +pkgrel=1 +pkgdesc="A simple code snippet & gist manager for developers built with Electron & Vue.js" +arch=('x86_64') +url="https://lauthieb.github.io/code-notes" +_githuburl="https://github.com/lauthieb/code-notes" +license=('MIT') +provides=("${pkgname%-bin}=${pkgver}") +conflicts=("${pkgname%-bin}") +depends=('bash' 'electron8') +source=("${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" + "LICENSE::https://raw.githubusercontent.com/lauthieb/code-notes/master/LICENSE" + "${pkgname%-bin}.sh") +sha256sums=('45262ac6118071ec68a750eff6dd5ab7578bbff870a03403a32fa46935b5c47c' + 'd292c9f2252858356efe3e4f88cdb6052756a2708ffe12ecb579b7731469ca76' + '5c32a43d7bed600bc560ed5a05d3e31cbe37ae52e657758550e5f1fa7f2210b8') +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" + sed "s|AppRun|/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}/squashfs-root/usr/share/icons/hicolor/256x256/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" + install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
\ No newline at end of file diff --git a/code-notes.sh b/code-notes.sh new file mode 100644 index 000000000000..af6b5d6d8356 --- /dev/null +++ b/code-notes.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron8 +_ASAR=/opt/code-notes/code-notes.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 |