summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-12 12:33:29 +0800
committerzxp198210052024-01-12 12:33:29 +0800
commitfa8c1eef7b194470457a3bf23dac5ba5aefa16f0 (patch)
treed89c337f3dc890b308f32cb993aa01f24604cdc8
parent19d5266d54f22b4f5be59db313020083ede28f7e (diff)
downloadaur-fa8c1eef7b194470457a3bf23dac5ba5aefa16f0.tar.gz
fix errors
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD18
-rw-r--r--lucashazardous-music-player.sh22
3 files changed, 26 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cc367a5165c2..0925d0d1b753 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,15 @@
pkgbase = lucashazardous-music-player-bin
pkgdesc = Desktop Electron app for playing and downloading music.
pkgver = 2.12.5
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/LucasHazardous/music-player
arch = x86_64
license = MIT
makedepends = squashfuse
depends = electron26
- depends = libx11
- depends = gdk-pixbuf2
- depends = libxext
+ depends = dbus-glib
depends = libdbusmenu-glib
depends = gtk2
- depends = dbus-glib
provides = lucashazardous-music-player=2.12.5
conflicts = lucashazardous-music-player
source = lucashazardous-music-player-2.12.5.AppImage::https://github.com/LucasHazardous/music-player/releases/download/v2.12.5/music-player-2.12.5.AppImage
@@ -20,6 +17,6 @@ pkgbase = lucashazardous-music-player-bin
source = lucashazardous-music-player.sh
sha256sums = 3b3ef8988b2365c0baae8a6832bf4985981d24deaa4c97e8fa2c919df93e7cfb
sha256sums = 4de62e75233b269ff4b9e1bf7ba805d82bd3cbeab4c204b54043dee4965f849c
- sha256sums = cb24ff4f5fbc5df8f7153bea4c5538542f67405264d6b5bea41c75e2ed9f5e7d
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = lucashazardous-music-player-bin
diff --git a/PKGBUILD b/PKGBUILD
index 05091a7b5061..fd265d18db04 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
_appname=music-player
pkgname="lucashazardous-${_appname}-bin"
pkgver=2.12.5
-pkgrel=2
+_electronversion=26
+pkgrel=3
pkgdesc="Desktop Electron app for playing and downloading music."
arch=('x86_64')
url="https://github.com/LucasHazardous/music-player"
@@ -10,13 +11,10 @@ license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron26'
- 'libx11'
- 'gdk-pixbuf2'
- 'libxext'
+ "electron${_electronversion}"
+ 'dbus-glib'
'libdbusmenu-glib'
'gtk2'
- 'dbus-glib'
)
makedepends=(
'squashfuse'
@@ -28,11 +26,15 @@ source=(
)
sha256sums=('3b3ef8988b2365c0baae8a6832bf4985981d24deaa4c97e8fa2c919df93e7cfb'
'4de62e75233b269ff4b9e1bf7ba805d82bd3cbeab4c204b54043dee4965f849c'
- 'cb24ff4f5fbc5df8f7153bea4c5538542f67405264d6b5bea41c75e2ed9f5e7d')
+ '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 -e "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" \
+ sed -e "s|AppRun --no-sandbox|${pkgname%-bin}|g" \
-e "s|audio;|AudioVideo;|g" \
-e "s|Icon=${_appname}|Icon=${pkgname%-bin}|g" \
-i "${srcdir}/squashfs-root/${_appname}.desktop"
diff --git a/lucashazardous-music-player.sh b/lucashazardous-music-player.sh
index d7ea5b868228..aacd8f895847 100644
--- a/lucashazardous-music-player.sh
+++ b/lucashazardous-music-player.sh
@@ -1,11 +1,15 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron26
-APPDIR=/usr/lib/lucashazardous-music-player
-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