Package Details: heynote-bin 1.7.0-1

Git Clone URL: https://aur.archlinux.org/heynote-bin.git (read-only, click to copy)
Package Base: heynote-bin
Description: A dedicated scratchpad for developers
Upstream URL: https://heynote.com/
Licenses: MIT
Conflicts: heynote
Provides: heynote
Submitter: fbis251
Maintainer: fbis251
Last Packager: fbis251
Votes: 1
Popularity: 0.076876
First Submitted: 2023-12-23 08:48 (UTC)
Last Updated: 2024-02-12 05:08 (UTC)

Dependencies (1)

Required by (0)

Sources (3)

Latest Comments

fbis251 commented on 2024-02-12 05:08 (UTC)

Thank you zxp19821005, in commit 60d6107c5276 updated the PKGBUILD and added the heynote.sh script you provided.

The commit also bumps the version to 1.7.0 which was just release a couple of hours ago

zxp19821005 commented on 2024-02-12 01:09 (UTC)

An optimized PKGBUILD method:

pkgname=heynote-bin
_pkgname=Heynote
pkgver=1.6.0
_electronversion=28
pkgrel=2
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=('287cdfa03976301c38e7837a078a7f0f352e35054ce9318a217c854764de3c55'
            'd78b14a03247374515264208d64b975e100af8a2fd0464afa07f76ca199700a7'
            '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
build() {
    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() {
    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"
}

heynote.sh

#!/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

Use system-wide electron28.