summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-11 09:28:12 +0800
committerzxp198210052024-01-11 09:28:12 +0800
commitc7d8c3c03b733d441de5195a92949c55e0839de4 (patch)
tree91295fc7a6a1aeea88d6dba840e552393add0cc6
parent11376397938b77901cc8f0899285c0ae16bcc4fd (diff)
downloadaur-c7d8c3c03b733d441de5195a92949c55e0839de4.tar.gz
fix errors
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD20
-rw-r--r--fishing-funds.sh22
3 files changed, 28 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c8bd9add8841..916c435e8008 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,22 @@
pkgbase = fishing-funds-bin
pkgdesc = 基金,大盘,股票,虚拟货币状态栏显示小应用,基于Electron开发.
pkgver = 8.1.1
- pkgrel = 1
+ pkgrel = 2
url = https://ff.1zilc.top/
arch = x86_64
license = GPL3
makedepends = asar
makedepends = squashfuse
- depends = electron27
depends = hicolor-icon-theme
- depends = libx11
- depends = gdk-pixbuf2
- depends = libxext
+ depends = electron27
+ depends = dbus-glib
depends = libdbusmenu-glib
depends = gtk2
- depends = dbus-glib
provides = fishing-funds=8.1.1
conflicts = fishing-funds
source = fishing-funds-8.1.1.AppImage::https://github.com/1zilc/fishing-funds/releases/download/v8.1.1/Fishing-Funds-8.1.1.AppImage
source = fishing-funds.sh
sha256sums = ea68b80929fb292701e3180a898f75f36d5183decc915629c4a2986920078bb0
- sha256sums = 7469cb4ef004815b0ae6797d6079cb6f702fd9f140fcc4d46edc7432f8b9e1a6
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = fishing-funds-bin
diff --git a/PKGBUILD b/PKGBUILD
index da2cae9508d9..8b1a1df9996f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
pkgname=fishing-funds-bin
_pkgname=Fishing-Funds
pkgver=8.1.1
-pkgrel=1
+_electronversion=27
+pkgrel=2
pkgdesc="基金,大盘,股票,虚拟货币状态栏显示小应用,基于Electron开发."
arch=('x86_64')
url="https://ff.1zilc.top/"
@@ -11,14 +12,11 @@ license=('GPL3')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron27'
'hicolor-icon-theme'
- 'libx11'
- 'gdk-pixbuf2'
- 'libxext'
+ "electron${_electronversion}"
+ 'dbus-glib'
'libdbusmenu-glib'
'gtk2'
- 'dbus-glib'
)
makedepends=(
'asar'
@@ -29,12 +27,16 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('ea68b80929fb292701e3180a898f75f36d5183decc915629c4a2986920078bb0'
- '7469cb4ef004815b0ae6797d6079cb6f702fd9f140fcc4d46edc7432f8b9e1a6')
+ 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
- sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
- find "${srcdir}/squashfs-root" -type d -exec chmod a+x {} \;
+ sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
+ find "${srcdir}/squashfs-root" -type d -exec chmod 755 {} \;
asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked"
sed "1i\process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';" -i "${srcdir}/app.asar.unpacked/dist/main/index.js"
asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
diff --git a/fishing-funds.sh b/fishing-funds.sh
index 4ddc52e604ae..aacd8f895847 100644
--- a/fishing-funds.sh
+++ b/fishing-funds.sh
@@ -1,11 +1,15 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron27
-APPDIR=/usr/lib/fishing-funds
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
+cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
-fi \ No newline at end of file
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+fi
+exit \ No newline at end of file