diff options
author | zxp19821005 | 2024-03-13 19:23:18 +0800 |
---|---|---|
committer | zxp19821005 | 2024-03-13 19:23:18 +0800 |
commit | 59100b3054e46c07050bf98385b72e2e4fabda6f (patch) | |
tree | 64075855f53b2119a23de0de25fbb3a6b8522e13 | |
parent | a4c91eafee5ab28a059d9b5b1823396ed3b408ff (diff) | |
download | aur-59100b3054e46c07050bf98385b72e2e4fabda6f.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | bear-graph.sh | 8 |
3 files changed, 19 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = bear-graph pkgdesc = Graph view of notes from Bear.app pkgver = 1.0.0 - pkgrel = 5 + pkgrel = 6 url = https://github.com/Chuckleroot/bear-graph arch = any license = MIT @@ -9,14 +9,13 @@ pkgbase = bear-graph makedepends = npm makedepends = nodejs makedepends = git - makedepends = node-gyp makedepends = base-devel makedepends = gcc - depends = electron25 + depends = electron25-bin conflicts = bear-graph source = bear-graph.git::git+https://github.com/Chuckleroot/bear-graph.git#tag=v1.0.0 source = bear-graph.sh sha256sums = SKIP - sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014 + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = bear-graph @@ -3,21 +3,20 @@ pkgname=bear-graph _pkgname="Bear Graph" pkgver=1.0.0 _electronversion=25 -pkgrel=5 +pkgrel=6 pkgdesc="Graph view of notes from Bear.app" arch=('any') url="https://github.com/Chuckleroot/bear-graph" license=('MIT') conflicts=("${pkgname}") depends=( - "electron${_electronversion}" + "electron${_electronversion}-bin" ) makedepends=( 'gendesk' 'npm' 'nodejs' 'git' - 'node-gyp' 'base-devel' 'gcc' ) @@ -26,11 +25,12 @@ source=( "${pkgname}.sh" ) sha256sums=('SKIP' - '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014') + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@options@||g" \ -i "${srcdir}/${pkgname}.sh" gendesk -f -n -q --categories="Utility" --name="${_pkgname}" --exec="${pkgname} %U" cd "${srcdir}/${pkgname}.git" @@ -42,6 +42,13 @@ build() { export ELECTRONVERSION="${_electronversion}" export npm_config_disturl=https://electronjs.org/headers HOME="${srcdir}/.electron-gyp" + 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 npm install npm run package } diff --git a/bear-graph.sh b/bear-graph.sh index f9ced1432cfc..7ddcaab8d734 100644 --- a/bear-graph.sh +++ b/bear-graph.sh @@ -1,14 +1,16 @@ -#!/bin/sh +#!/bin/bash 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 +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 |