summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..da2cae9508d9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=fishing-funds-bin
+_pkgname=Fishing-Funds
+pkgver=8.1.1
+pkgrel=1
+pkgdesc="基金,大盘,股票,虚拟货币状态栏显示小应用,基于Electron开发."
+arch=('x86_64')
+url="https://ff.1zilc.top/"
+_ghurl="https://github.com/1zilc/fishing-funds"
+license=('GPL3')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ 'electron27'
+ 'hicolor-icon-theme'
+ 'libx11'
+ 'gdk-pixbuf2'
+ 'libxext'
+ 'libdbusmenu-glib'
+ 'gtk2'
+ 'dbus-glib'
+)
+makedepends=(
+ 'asar'
+ 'squashfuse'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('ea68b80929fb292701e3180a898f75f36d5183decc915629c4a2986920078bb0'
+ '7469cb4ef004815b0ae6797d6079cb6f702fd9f140fcc4d46edc7432f8b9e1a6')
+build() {
+ 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 {} \;
+ 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"
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -r "${srcdir}/squashfs-root/resources/assets" "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ for _icons in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
+ install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
+ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
+ done
+} \ No newline at end of file