2024-01-29 22:45:51 +03:00
|
|
|
# Maintainer: Andrey Onischenko loraner123@gmail.com
|
|
|
|
|
2024-01-30 16:19:10 +03:00
|
|
|
pkgname=yandexmusic
|
|
|
|
pkgver="%version%"
|
|
|
|
pkgrel="%release%"
|
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-30 16:19:10 +03:00
|
|
|
source=("%exe_link%")
|
|
|
|
sha256sums=("%exe_sha256%")
|
2024-01-29 23:48:42 +03:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
npm install @electron/asar;
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2024-01-30 16:19:10 +03:00
|
|
|
sh "$srcdir/repack.sh" "%exe_name%"
|
2024-01-29 23:48:42 +03:00
|
|
|
}
|
2024-01-29 21:41:52 +03:00
|
|
|
|
|
|
|
package() {
|
|
|
|
mkdir -p "$pkgdir/usr/lib/yandexmusic"
|
|
|
|
mkdir -p "$pkgdir/usr/share/applications"
|
|
|
|
mkdir -p "$pkgdir/usr/bin"
|
|
|
|
|
2024-01-30 16:19:10 +03:00
|
|
|
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-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"
|
|
|
|
}
|