diff options
author | zxp19821005 | 2024-01-10 17:02:37 +0800 |
---|---|---|
committer | zxp19821005 | 2024-01-10 17:02:37 +0800 |
commit | 494d14d52b6286695c0a8c71f6a79a3dfc70e326 (patch) | |
tree | 7fd25e60f88505f2d54856145ce736001a675705 | |
parent | 049ce35e9b21debcdd994e8d97e127928cad73ac (diff) | |
download | aur-494d14d52b6286695c0a8c71f6a79a3dfc70e326.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | notesnook.sh | 15 |
3 files changed, 52 insertions, 27 deletions
@@ -1,27 +1,25 @@ pkgbase = notesnook pkgdesc = A fully open source & end-to-end encrypted note taking alternative to Evernote pkgver = 2.6.14 - pkgrel = 1 + pkgrel = 2 url = https://notesnook.com/ arch = x86_64 license = GPL3 makedepends = nvm makedepends = npm makedepends = git - depends = libappindicator-gtk3 - depends = libnotify - depends = libsodium - depends = libxss - depends = libxtst - depends = fuse2 - depends = alsa-lib - depends = nspr - depends = nss + makedepends = zip + makedepends = node-gyp + makedepends = make + makedepends = gcc + depends = electron25 provides = notesnook=2.6.14 conflicts = notesnook source = notesnook.git::git+https://github.com/streetwriters/notesnook.git#tag=v2.6.14 source = notesnook.desktop + source = notesnook.sh sha256sums = SKIP sha256sums = 102a538ee9432310d854842a578cd3371df0431b4db617479de66aa45b5f2440 + sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231 pkgname = notesnook @@ -7,8 +7,9 @@ # Contributor: Christian Finnberg <christian@finnberg.net> pkgname=notesnook pkgver=2.6.14 -_electronversion=28 -pkgrel=1 +_electronversion=25 +_nodeversion=16 +pkgrel=2 pkgdesc="A fully open source & end-to-end encrypted note taking alternative to Evernote" arch=('x86_64') url="https://notesnook.com/" @@ -17,34 +18,36 @@ license=('GPL3') provides=("${pkgname}=${pkgver}") conflicts=("${pkgname}") depends=( - 'libappindicator-gtk3' - 'libnotify' - 'libsodium' - 'libxss' - 'libxtst' - 'fuse2' - 'alsa-lib' - 'nspr' - 'nss' + "electron${_electronversion}" ) makedepends=( 'nvm' 'npm' 'git' + 'zip' + 'node-gyp' + 'make' + 'gcc' ) source=( "${pkgname}.git::git+${_ghurl}.git#tag=v${pkgver}" "${pkgname}.desktop" + "${pkgname}.sh" ) sha256sums=('SKIP' - '102a538ee9432310d854842a578cd3371df0431b4db617479de66aa45b5f2440') + '102a538ee9432310d854842a578cd3371df0431b4db617479de66aa45b5f2440' + 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231') _ensure_local_nvm() { export NVM_DIR="${srcdir}/.nvm" source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]] - nvm install 16 - nvm use 16 + nvm install "${_nodeversion}" + nvm use "${_nodeversion}" } build() { + sed -e "s|@electronversion@|${_electronversion}|" \ + -e "s|@appname@|${pkgname}|g" \ + -e "s|@appasar@|app|g" \ + -i "${srcdir}/${pkgname}.sh" _ensure_local_nvm cd "${srcdir}/${pkgname}.git" export npm_config_build_from_source=true @@ -61,13 +64,22 @@ build() { npm run bootstrap -- --scope=web npx nx build:desktop @notesnook/web npm run bootstrap -- --scope=desktop + cd "${srcdir}/${pkgname}.git/apps/desktop" npx nx run release --project @notesnook/desktop npx electron-builder --linux AppImage:x64 AppImage:arm64 -p never } package() { - install -Dm755 -d "${pkgdir}/"{opt/${pkgname},usr/bin} - cp -r "${srcdir}/${pkgname}.git/apps/desktop/output/linux-unpacked/"* "${pkgdir}/opt/${pkgname}" - ln -sf "/opt/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" + install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}" + case "${CARCH}" in + x86_64) + _osarch=linux-unpacked + ;; + aarch64) + _osarch=linux-arm64-unpacked + ;; + esac + cp -r "${srcdir}/${pkgname}.git/apps/desktop/output/${_osarch}/resources/"{app,assets} "${pkgdir}/usr/lib/${pkgname}" for _icons in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do install -Dm644 "${srcdir}/${pkgname}.git/apps/desktop/assets/icons/${_icons}.png" \ "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname}.png" diff --git a/notesnook.sh b/notesnook.sh new file mode 100644 index 000000000000..aacd8f895847 --- /dev/null +++ b/notesnook.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -e +_APPDIR="/usr/lib/@appname@" +_ASAR="${_APPDIR}/@appasar@" +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@ "${_ASAR}" "$@" +else + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" +fi +exit
\ No newline at end of file |