summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-03-14 15:00:49 +0800
committerzxp198210052024-03-14 15:00:49 +0800
commitb562da5fed3e3292532d98964643b81719153783 (patch)
tree85fd1345286eb975b1e7e8feca60d06ec16420b8
parentd0825a8a79773a23e1abc8d3786d636ff9e35a25 (diff)
downloadaur-b562da5fed3e3292532d98964643b81719153783.tar.gz
fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD16
-rw-r--r--frontimer.sh8
3 files changed, 21 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d5ef7dcfe8f..724621ea374c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 2c5955a2a21a..86f5bd21b287 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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