0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 22:22:59 +03:00

Switch from npm to arch package directly

This commit is contained in:
Andrey Onishchenko 2024-02-08 15:02:02 +03:00
parent a5ac5f9ce1
commit 1f9da65811
3 changed files with 4 additions and 8 deletions

View File

@ -16,7 +16,7 @@ case $OS in
"Arch Linux")
echo "Arch Linux"
pacman -Syy --noconfirm
pacman -S --noconfirm git sudo base-devel p7zip nodejs jq npm electron libpulse dpkg unzip xdg-utils
pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron libpulse dpkg unzip xdg-utils
# fix access
mkdir /.npm
chown -R 65534:65534 "/.npm"

View File

@ -59,7 +59,7 @@ rm -rf "$EXTRACTED"
mv "$EXTRACTED/resources/app.asar" "$TEMPDIR/app.asar"
rm -rf "$EXTRACTED"
rm "$TEMPDIR/app-64.7z"
npx asar extract "$TEMPDIR/app.asar" "$TEMPDIR/app"
asar extract "$TEMPDIR/app.asar" "$TEMPDIR/app"
rm "$TEMPDIR/app.asar"
curdir="$PWD"
@ -111,7 +111,7 @@ mkdir -p "$dst"
echo "Packing"
cd "$curdir"
npx asar pack "$TEMPDIR/app" "$dst/yandexmusic.asar"
asar pack "$TEMPDIR/app" "$dst/yandexmusic.asar"
for ext in png svg; do
mv "$TEMPDIR/app/build/next-desktop/favicon.$ext" "$dst"
done

View File

@ -8,15 +8,11 @@ arch=("any")
url="https://github.com/cucumber-sp/yandex-music-linux"
license=("custom")
depends=("electron" "libpulse" "xdg-utils")
makedepends=("p7zip" "nodejs" "npm" "jq")
makedepends=("p7zip" "nodejs" "asar" "jq")
source=("%exe_link%" "git+https://github.com/cucumber-sp/yandex-music-linux")
sha256sums=("%exe_sha256%" "SKIP")
prepare() {
npm install @electron/asar
}
build() {
sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/%exe_name%"
}