From 8fd5911e0723553e76e2240f83c2f176ea7ae9ee Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Tue, 30 Jan 2024 18:07:57 +0300 Subject: [PATCH] some updates for arch --- PKGBUILD | 14 +++++++------- generate_packages.sh | 3 +-- repack.sh | 5 +---- templates/PKGBUILD | 14 +++++++------- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 036cf6d..603254d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,15 +10,15 @@ license=("custom") depends=("electron" "libpulse") makedepends=("p7zip" "nodejs" "jq") -source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.8.exe") -sha256sums=("78b4e1acb61becbbddeb6f48e9d2b55ed7d718cd99c205b89a94f7c3af9df803") +source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.8.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") +sha256sums=("78b4e1acb61becbbddeb6f48e9d2b55ed7d718cd99c205b89a94f7c3af9df803" "SKIP") prepare() { npm install @electron/asar; } build() { - sh "$srcdir/repack.sh" "Yandex_Music_x64_5.0.8.exe" + sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.8.exe" } package() { @@ -26,10 +26,10 @@ package() { mkdir -p "$pkgdir/usr/share/applications" mkdir -p "$pkgdir/usr/bin" - install -Dm644 "$srcdir/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar" - install -Dm644 "$srcdir/out/yandexmusic.desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop" - install -Dm644 "$srcdir/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm644 "$srcdir/templates/icon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png" + install -Dm644 "$srcdir/yandex-music-linux/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar" + install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop" + install -Dm644 "$srcdir/yandex-music-linux/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "$srcdir/yandex-music-linux/templates/icon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png" # Create a script to launch the app with Electron echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic" diff --git a/generate_packages.sh b/generate_packages.sh index 3e4e958..cd7f573 100644 --- a/generate_packages.sh +++ b/generate_packages.sh @@ -1,7 +1,6 @@ #!/bin/bash -rm -rf ./tmp -mkdir ./tmp +mkdir -p ./tmp # loading json from file https://music-desktop-application.s3.yandex.net/stable/download.json curl -s https://music-desktop-application.s3.yandex.net/stable/download.json > ./tmp/download.json diff --git a/repack.sh b/repack.sh index a414f45..4c64d42 100755 --- a/repack.sh +++ b/repack.sh @@ -115,7 +115,4 @@ asar pack "./app" "./out/yandexmusic.asar" rm -rf ./app -echo "Done" - -cp "./LICENSE.md" "./out/LICENSE.md" -cp "./templates/desktop" "./out/yandexmusic.desktop" \ No newline at end of file +echo "Done" \ No newline at end of file diff --git a/templates/PKGBUILD b/templates/PKGBUILD index 9a23dc0..4e0a85c 100644 --- a/templates/PKGBUILD +++ b/templates/PKGBUILD @@ -10,15 +10,15 @@ license=("custom") depends=("electron" "libpulse") makedepends=("p7zip" "nodejs" "jq") -source=("%exe_link%") -sha256sums=("%exe_sha256%") +source=("%exe_link%" "git+https://github.com/cucumber-sp/yandex-music-linux") +sha256sums=("%exe_sha256%" "SKIP") prepare() { npm install @electron/asar; } build() { - sh "$srcdir/repack.sh" "%exe_name%" + sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/%exe_name%" } package() { @@ -26,10 +26,10 @@ package() { mkdir -p "$pkgdir/usr/share/applications" mkdir -p "$pkgdir/usr/bin" - install -Dm644 "$srcdir/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar" - install -Dm644 "$srcdir/out/yandexmusic.desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop" - install -Dm644 "$srcdir/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm644 "$srcdir/templates/icon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png" + install -Dm644 "$srcdir/yandex-music-linux/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar" + install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop" + install -Dm644 "$srcdir/yandex-music-linux/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "$srcdir/yandex-music-linux/templates/icon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png" # Create a script to launch the app with Electron echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"