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

39 lines
1.3 KiB
Bash
Raw Normal View History

2024-01-30 16:19:10 +03:00
# Maintainer: Andrey Onischenko loraner123@gmail.com
pkgname=yandexmusic
pkgver="5.0.8"
pkgrel="1"
pkgdesc="Yandex Music Client"
arch=("any")
url="https://github.com/cucumber-sp/yandex-music-linux"
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")
prepare() {
npm install @electron/asar;
}
build() {
sh "$srcdir/repack.sh" "Yandex_Music_x64_5.0.8.exe"
}
package() {
mkdir -p "$pkgdir/usr/lib/yandexmusic"
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"
2024-01-30 17:36:12 +03:00
install -Dm644 "$srcdir/templates/icon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png"
2024-01-30 16:19:10 +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"
}