diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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 } |