0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 22:22:59 +03:00
yandex-music-linux/templates/PKGBUILD
2024-01-30 16:19:10 +03:00

38 lines
1.1 KiB
Bash

# Maintainer: Andrey Onischenko loraner123@gmail.com
pkgname=yandexmusic
pkgver="%version%"
pkgrel="%release%"
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=("%exe_link%")
sha256sums=("%exe_sha256%")
prepare() {
npm install @electron/asar;
}
build() {
sh "$srcdir/repack.sh" "%exe_name%"
}
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"
# 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"
}