summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-19 13:28:54 +0800
committerzxp198210052023-12-19 13:28:54 +0800
commita9290b56a59602c253eb1674a7e8fcc9e057a891 (patch)
tree0e8e213621697df58ef701c4ecfcf8a0d4c37ef0
parent9adcc4edb84f60d197505b06b77958b13002bc85 (diff)
downloadaur-apple-music-electron-bin.tar.gz
fix errors
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD15
-rw-r--r--apple-music-electron.sh20
3 files changed, 26 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 81c6ba87e7f0..4df9e392ca30 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,11 @@
pkgbase = apple-music-electron-bin
pkgdesc = A free, lightweight, open source alternative to iTunes and other Apple Music applications based on Electron 15
pkgver = 3.1.1
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/Alex313031/Apple-Music-Electron
arch = x86_64
license = MIT
- depends = electron15
+ depends = electron19
depends = hicolor-icon-theme
depends = java-runtime
depends = lib32-glibc
@@ -17,10 +17,10 @@ pkgbase = apple-music-electron-bin
provides = apple-music-electron=3.1.1
conflicts = apple-music-electron
source = apple-music-electron-3.1.1.deb::https://github.com/Alex313031/Apple-Music-Electron/releases/download/v3.1.1/apple-music_3.1.1_amd64.deb
- source = LICENSE::https://raw.githubusercontent.com/Alex313031/Apple-Music-Electron/v3.1.1/LICENSE.md
+ source = LICENSE-3.1.1::https://raw.githubusercontent.com/Alex313031/Apple-Music-Electron/v3.1.1/LICENSE.md
source = apple-music-electron.sh
sha256sums = 7bf6157f871af6f3dee522ffbdb846c88689c2c87a542bdbe12898e1dfd280b8
sha256sums = 0fd63c3d94a7db5724728de22068188d45aa0c6be04c6e4c4c5983b5d46d5eee
- sha256sums = 7ad83e25812c58c83f9fdcdeabaf49a09d6f7172fc085c2d60da79e6b12182d2
+ sha256sums = 68521cf799a902fb3c86aa1ebdcfa92566ee49621b0e1db5873a0501d893b2e6
pkgname = apple-music-electron-bin
diff --git a/PKGBUILD b/PKGBUILD
index 11a04d31717e..aa6fa091fcf8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,8 @@
pkgname=apple-music-electron-bin
_pkgname="Apple Music"
pkgver=3.1.1
-pkgrel=4
+_electronversion=19
+pkgrel=5
pkgdesc="A free, lightweight, open source alternative to iTunes and other Apple Music applications based on Electron 15"
arch=('x86_64')
url="https://github.com/Alex313031/Apple-Music-Electron"
@@ -12,7 +13,7 @@ license=("MIT")
conflicts=("${pkgname%-bin}")
provides=("${pkgname%-bin}=${pkgver}")
depends=(
- 'electron15'
+ "electron${_electronversion}"
'hicolor-icon-theme'
'java-runtime'
'lib32-glibc'
@@ -26,13 +27,17 @@ optdepends=(
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${pkgname%-electron-bin}_${pkgver}_amd64.deb"
- "LICENSE::https://raw.githubusercontent.com/Alex313031/Apple-Music-Electron/v${pkgver}/LICENSE.md"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/Alex313031/Apple-Music-Electron/v${pkgver}/LICENSE.md"
"${pkgname%-bin}.sh"
)
sha256sums=('7bf6157f871af6f3dee522ffbdb846c88689c2c87a542bdbe12898e1dfd280b8'
'0fd63c3d94a7db5724728de22068188d45aa0c6be04c6e4c4c5983b5d46d5eee'
- '7ad83e25812c58c83f9fdcdeabaf49a09d6f7172fc085c2d60da79e6b12182d2')
+ '68521cf799a902fb3c86aa1ebdcfa92566ee49621b0e1db5873a0501d893b2e6')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.xz"
sed "s|\"/opt/${_pkgname}/${pkgname%-bin}\" %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
@@ -45,5 +50,5 @@ package() {
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
- install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} \ No newline at end of file
diff --git a/apple-music-electron.sh b/apple-music-electron.sh
index e74d06fd3269..98f84b151b4f 100644
--- a/apple-music-electron.sh
+++ b/apple-music-electron.sh
@@ -1,11 +1,15 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron15
-APPDIR="/usr/lib/apple-music-electron"
-export PATH="${APPDIR}:${PATH}"
-#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${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
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file