diff options
author | zxp19821005 | 2024-03-14 16:47:13 +0800 |
---|---|---|
committer | zxp19821005 | 2024-03-14 16:47:13 +0800 |
commit | c0ebabf1020efce355b4e429c7d01690c67ff62a (patch) | |
tree | 08450ea2107a4789a689bacdeaca409760f5f6b0 | |
parent | e87fb95f31ad7dab4099d04a0431ae8fb89c4fa2 (diff) | |
download | aur-c0ebabf1020efce355b4e429c7d01690c67ff62a.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | notesnook.sh | 5 |
3 files changed, 14 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = notesnook pkgdesc = A fully open source & end-to-end encrypted note taking alternative to Evernote pkgver = 2.6.16 - pkgrel = 1 + pkgrel = 2 url = https://notesnook.com/ arch = aarch64 arch = x86_64 @@ -13,7 +13,7 @@ pkgbase = notesnook makedepends = base-devel makedepends = gcc makedepends = curl - depends = electron25 + depends = electron25-bin provides = notesnook=2.6.16 conflicts = notesnook source = notesnook.git::git+https://github.com/streetwriters/notesnook.git#tag=v2.6.16 @@ -21,6 +21,6 @@ pkgbase = notesnook source = notesnook.sh sha256sums = SKIP sha256sums = 102a538ee9432310d854842a578cd3371df0431b4db617479de66aa45b5f2440 - sha256sums = 50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = notesnook @@ -9,7 +9,7 @@ pkgname=notesnook pkgver=2.6.16 _electronversion=25 _nodeversion=16 -pkgrel=1 +pkgrel=2 pkgdesc="A fully open source & end-to-end encrypted note taking alternative to Evernote" arch=( 'aarch64' @@ -21,7 +21,7 @@ license=('GPL-3.0-or-later') provides=("${pkgname}=${pkgver}") conflicts=("${pkgname}") depends=( - "electron${_electronversion}" + "electron${_electronversion}-bin" ) makedepends=( 'nvm' @@ -39,7 +39,7 @@ source=( ) sha256sums=('SKIP' '102a538ee9432310d854842a578cd3371df0431b4db617479de66aa45b5f2440' - '50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe') + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') _ensure_local_nvm() { export NVM_DIR="${srcdir}/.nvm" source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]] @@ -50,6 +50,7 @@ build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname}|g" \ -e "s|@runname@|app|g" \ + -e "s|@options@||g" \ -i "${srcdir}/${pkgname}.sh" _ensure_local_nvm export npm_config_build_from_source=true @@ -62,10 +63,12 @@ build() { HOME="${srcdir}/.electron-gyp" #build cd "${srcdir}/${pkgname}.git" - if [ `curl ifconfig.co/country` == "China" ];then + if [ `curl ifconfig.co/country` = "China" ];then echo 'registry="https://registry.npmmirror.com/"' >> .npmrc echo 'electron_mirror="https://registry.npmmirror.com/-/binary/electron/"' >> .npmrc echo 'electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"' >> .npmrc + else + echo "Your network is OK." fi # Install packages npm ci --ignore-scripts --prefer-offline --no-audit @@ -76,8 +79,7 @@ build() { # Build Electron wrapper cd "${srcdir}/${pkgname}.git/apps/desktop" npx nx run release --project @notesnook/desktop - # Build AppImage - npx electron-builder -l AppImage -p never + npx electron-builder --dir } package() { install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" diff --git a/notesnook.sh b/notesnook.sh index 86cb3dc6a9bf..7ddcaab8d734 100644 --- a/notesnook.sh +++ b/notesnook.sh @@ -2,6 +2,7 @@ set -e _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_OPTIONS="@options@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 @@ -9,7 +10,7 @@ export ELECTRON_FORCE_IS_PACKAGED=true export NODE_ENV=production cd "${_APPDIR}" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? else - exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? fi
\ No newline at end of file |