2024-01-29 22:45:51 +03:00
|
|
|
# Maintainer: Andrey Onischenko loraner123@gmail.com
|
|
|
|
|
2024-01-29 22:33:36 +03:00
|
|
|
pkgname=yandexmusic-bin
|
2024-01-29 23:48:42 +03:00
|
|
|
pkgver=VERSION
|
|
|
|
pkgrel=RELEASE_NUMBER
|
2024-01-29 21:41:52 +03:00
|
|
|
pkgdesc="Yandex Music Client"
|
2024-01-29 23:48:42 +03:00
|
|
|
arch=("any")
|
2024-01-29 21:41:52 +03:00
|
|
|
url="https://github.com/cucumber-sp/yandex-music-linux"
|
2024-01-29 23:48:42 +03:00
|
|
|
license=("custom")
|
|
|
|
depends=("electron" "libpulse")
|
|
|
|
makedepends=("p7zip" "nodejs" "jq")
|
2024-01-29 21:41:52 +03:00
|
|
|
|
2024-01-29 23:48:42 +03:00
|
|
|
source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_$pkgver.exe" "https://github.com/cucumber-sp/yandex-music-linux/archive/v$pkgver-$pkgrel.tar.gz")
|
|
|
|
sha256sums=("EXE_HASH" "SOURCE_HASH")
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
npm install @electron/asar;
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
arch_dir="yandex-music-linux-$pkgver-$pkgrel"
|
|
|
|
mv "$srcdir/Yandex_Music_x64_$pkgver.exe" "$srcdir/$arch_dir"
|
|
|
|
cd "$srcdir/$arch_dir"
|
|
|
|
sh "./repack.sh" "Yandex_Music_x64_$pkgver.exe"
|
|
|
|
}
|
2024-01-29 21:41:52 +03:00
|
|
|
|
|
|
|
package() {
|
2024-01-29 23:48:42 +03:00
|
|
|
arch_dir="yandex-music-linux-$pkgver-$pkgrel"
|
2024-01-29 21:41:52 +03:00
|
|
|
mkdir -p "$pkgdir/usr/lib/yandexmusic"
|
|
|
|
mkdir -p "$pkgdir/usr/share/applications"
|
|
|
|
mkdir -p "$pkgdir/usr/bin"
|
|
|
|
|
2024-01-29 23:48:42 +03:00
|
|
|
install -Dm644 "$srcdir/$arch_dir/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
|
|
|
|
install -Dm644 "$srcdir/$arch_dir/out/yandexmusic.desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
|
|
|
|
install -Dm644 "$srcdir/$arch_dir/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
|
|
|
|
rm -rf "$srcdir/$arch_dir"
|
2024-01-29 21:41:52 +03:00
|
|
|
|
|
|
|
# Create a script to launch the app with Electron
|
|
|
|
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
|
|
|
|
echo "electron /usr/lib/yandexmusic/yandexmusic.asar" >> "$pkgdir/usr/bin/yandexmusic"
|
|
|
|
chmod 755 "$pkgdir/usr/bin/yandexmusic"
|
|
|
|
}
|