summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbis2512024-02-11 21:07:52 -0800
committerfbis2512024-02-11 21:07:52 -0800
commit60d6107c52762a330c0ed366d3671fae233affdf (patch)
treecaac26c1447de669d03e8a77361d2a029dcd745a
parent9b647f349a2cb54e8b5236b7c9a4472728ee019d (diff)
downloadaur-60d6107c5276.tar.gz
Version 1.7.0
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD91
-rwxr-xr-xheynote.sh14
4 files changed, 62 insertions, 61 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f882c88e9f00..01c0d5d552b4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,18 @@
pkgbase = heynote-bin
pkgdesc = A dedicated scratchpad for developers
- pkgver = 1.6.0
+ pkgver = 1.7.0
pkgrel = 1
- url = https://github.com/heyman/heynote
+ url = https://heynote.com/
arch = x86_64
license = MIT
- provides = heynote
- options = !strip
- source = https://github.com/heyman/heynote/releases/download/v1.6.0/Heynote_1.6.0_x86_64.AppImage
- sha512sums = c23263f1371b6cc8f031fb04caff654b3bd8686128fabe059df16743f986f36b4217dc09e56c042bbbb4b42c505b150f0d298516b76d847f39320b6a210dfb5f
+ depends = electron28
+ provides = heynote=1.7.0
+ conflicts = heynote
+ source = heynote-1.7.0.AppImage::https://github.com/heyman/heynote/releases/download/v1.7.0/Heynote_1.7.0_x86_64.AppImage
+ source = LICENSE-1.7.0::https://raw.githubusercontent.com/heyman/heynote/v1.7.0/LICENSE
+ source = heynote.sh
+ sha256sums = 6fcfb55bae2cbbe124bd5cfa86087a3900135aa6575fa2dc41331ce32d253c47
+ sha256sums = d78b14a03247374515264208d64b975e100af8a2fd0464afa07f76ca199700a7
+ sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014
pkgname = heynote-bin
diff --git a/.gitignore b/.gitignore
index f71c635dafda..3a84c9805523 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
!.gitignore
!PKGBUILD
!.SRCINFO
+!heynote.sh
diff --git a/PKGBUILD b/PKGBUILD
index 91adc5fd6491..22cec96b6310 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,62 +1,43 @@
# Maintainer: FBis251 <aur at fbis251 dot com>
-
-# This PKGBUILD was modified from the localsend-bin PKGBUILD by Nixuge
-# https://aur.archlinux.org/packages/localsend-bin
-
+# Contributor: zxp19821005
+# Current implementation below provided by zxp19821005
pkgname=heynote-bin
-pkgver=1.6.0
+_pkgname=Heynote
+pkgver=1.7.0
+_electronversion=28
pkgrel=1
-pkgdesc='A dedicated scratchpad for developers'
-url=https://github.com/heyman/heynote
-arch=(x86_64)
-license=(MIT)
-provides=('heynote')
-options=(!strip)
-source=("https://github.com/heyman/heynote/releases/download/v${pkgver}/Heynote_${pkgver}_x86_64.AppImage")
-sha512sums=('c23263f1371b6cc8f031fb04caff654b3bd8686128fabe059df16743f986f36b4217dc09e56c042bbbb4b42c505b150f0d298516b76d847f39320b6a210dfb5f')
-_appimage="Heynote_${pkgver}_x86_64.AppImage"
-_appimage_nover="heynote.AppImage"
-_pkgname="heynote"
-_pkgdesktop="${_pkgname}.desktop"
-
-prepare() {
- chmod +x "${_appimage}"
- ./"${_appimage}" --appimage-extract
-}
-
+pkgdesc="A dedicated scratchpad for developers"
+arch=('x86_64')
+url="https://heynote.com/"
+_ghurl="https://github.com/heyman/heynote"
+license=('MIT')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ "electron${_electronversion}"
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_${CARCH}.AppImage"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/heyman/heynote/v${pkgver}/LICENSE"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('6fcfb55bae2cbbe124bd5cfa86087a3900135aa6575fa2dc41331ce32d253c47'
+ 'd78b14a03247374515264208d64b975e100af8a2fd0464afa07f76ca199700a7'
+ '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
build() {
- # Adjust .desktop so it will work outside of AppImage container
- sed -i -E \
- "s|Exec=AppRun --no-sandbox %U|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|" \
- "squashfs-root/${_pkgdesktop}"
-
- # Adjust .desktop to have it point to the correct icon (@CIAvash)
- # sed -i -E 's/^Icon=.+/Icon=localsend/' "squashfs-root/${_pkgdesktop}"
-
- # Fix permissions; .AppImage permissions are 700 for all directories
- chmod -R a-x+rX squashfs-root/usr
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@runname@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
+ chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
+ "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
+ sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
}
-
package() {
- # AppImage
- install -Dm755 \
- "${srcdir}/${_appimage}" \
- "${pkgdir}/opt/${_pkgname}/${_appimage_nover}"
-
- # Desktop file
- install -Dm644 \
- "${srcdir}/squashfs-root/${_pkgdesktop}" \
- "${pkgdir}/usr/share/applications/${_pkgdesktop}"
-
- # Icon file (using the 512x512 one only)
- install -Dm644 \
- "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/heynote.png" \
- "${pkgdir}/usr/share/icons/heynote.png"
-
- # Symlink executable
- install -dm755 "${pkgdir}/usr/bin"
- ln -s \
- "/opt/${_pkgname}/${_appimage_nover}" \
- "${pkgdir}/usr/bin/${_pkgname}"
-}
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+} \ No newline at end of file
diff --git a/heynote.sh b/heynote.sh
new file mode 100755
index 000000000000..f9ced1432cfc
--- /dev/null
+++ b/heynote.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_RUNNAME="${_APPDIR}/@runname@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
+cd "${_APPDIR}"
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $?
+else
+ exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $?
+fi \ No newline at end of file