From 1f9da6581158568d48bc4dec37df34faa4a42b2d Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Thu, 8 Feb 2024 15:02:02 +0300 Subject: [PATCH] Switch from npm to arch package directly --- .github/workflows/build.sh | 2 +- repack.sh | 4 ++-- templates/PKGBUILD | 6 +----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index b904b0f..c303b37 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -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" diff --git a/repack.sh b/repack.sh index 66e7584..16dd3b3 100755 --- a/repack.sh +++ b/repack.sh @@ -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 diff --git a/templates/PKGBUILD b/templates/PKGBUILD index 18cb91b..980e657 100644 --- a/templates/PKGBUILD +++ b/templates/PKGBUILD @@ -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%" }