diff options
author | zxp19821005 | 2024-03-14 15:00:49 +0800 |
---|---|---|
committer | zxp19821005 | 2024-03-14 15:00:49 +0800 |
commit | b562da5fed3e3292532d98964643b81719153783 (patch) | |
tree | 85fd1345286eb975b1e7e8feca60d06ec16420b8 | |
parent | d0825a8a79773a23e1abc8d3786d636ff9e35a25 (diff) | |
download | aur-b562da5fed3e3292532d98964643b81719153783.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | frontimer.sh | 8 |
3 files changed, 21 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = frontimer pkgdesc = Desktop timer application always displayed in the forefront of the screen pkgver = 0.1.17 - pkgrel = 4 + pkgrel = 5 url = https://github.com/seita1996/frontimer arch = any license = MIT @@ -10,11 +10,11 @@ pkgbase = frontimer makedepends = npm makedepends = yarn makedepends = git - depends = electron25 + depends = electron25-bin conflicts = frontimer source = frontimer.git::git+https://github.com/seita1996/frontimer.git#tag=v0.1.17 source = frontimer.sh sha256sums = SKIP - sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231 + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = frontimer @@ -3,14 +3,14 @@ pkgname=frontimer pkgver=0.1.17 _electronversion=25 _nodeversion=20 -pkgrel=4 +pkgrel=5 pkgdesc="Desktop timer application always displayed in the forefront of the screen" arch=('any') url="https://github.com/seita1996/frontimer" license=('MIT') conflicts=("${pkgname}") depends=( - "electron${_electronversion}" + "electron${_electronversion}-bin" ) makedepends=( 'gendesk' @@ -24,7 +24,7 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('SKIP' - 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231') + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') _ensure_local_nvm() { export NVM_DIR="${srcdir}/.nvm" source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]] @@ -46,6 +46,16 @@ build() { export ELECTRONVERSION="${_electronversion}" export npm_config_disturl=https://electronjs.org/headers HOME="${srcdir}/.electron-gyp" + mkdir -p "${srcdir}/.electron-gyp" + touch "${srcdir}/.electron-gyp/.yarnrc" + 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 + sed "s|--linux AppImage|--dir|g" -i package.json yarn install --cache-folder "${srcdir}/.yarn_cache" yarn run build yarn run ebuilder:linux diff --git a/frontimer.sh b/frontimer.sh index f9ced1432cfc..7ddcaab8d734 100644 --- a/frontimer.sh +++ b/frontimer.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 |