57 lines
2.0 KiB
Bash
57 lines
2.0 KiB
Bash
# Maintainer: Yuriy Panov <uriy.panov@gmail.com>
|
|
# Builds the checked-out commit of this repository: run `makepkg -si` in this directory.
|
|
pkgname=musyx
|
|
pkgver=0.4.0
|
|
pkgrel=1
|
|
pkgdesc='Desktop player for Yandex Music (unofficial)'
|
|
arch=('x86_64' 'aarch64')
|
|
license=('MIT' 'OFL-1.1' 'ISC')
|
|
depends=('alsa-lib' 'dbus' 'gcc-libs' 'glibc' 'libxkbcommon' 'wayland' 'hicolor-icon-theme')
|
|
optdepends=('gnome-keyring: keeps the sign-in (any Secret Service provider works)'
|
|
'vulkan-driver: GPU rendering')
|
|
makedepends=('cargo' 'git' 'imagemagick')
|
|
options=('!lto' '!debug')
|
|
source=("$pkgname::git+file://${startdir%/packaging/arch}")
|
|
sha256sums=('SKIP')
|
|
|
|
app_id=it.panov.musyx.desktop
|
|
|
|
pkgver() {
|
|
cd "$pkgname"
|
|
sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1
|
|
}
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
|
|
cargo build --frozen --release -p musyx
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname"
|
|
export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
|
|
cargo test --frozen --release --workspace
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
install -Dm755 target/release/musyx "$pkgdir/usr/bin/musyx"
|
|
install -Dm644 "packaging/linux/$app_id.desktop" "$pkgdir/usr/share/applications/$app_id.desktop"
|
|
install -Dm644 "packaging/linux/$app_id.metainfo.xml" "$pkgdir/usr/share/metainfo/$app_id.metainfo.xml"
|
|
for size in 16 32 48 64 128 256 512; do
|
|
install -dm755 "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps"
|
|
magick crates/musyx/assets/icon/musyx.png -resize "${size}x${size}" \
|
|
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/$app_id.png"
|
|
done
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -Dm644 crates/musyx/assets/fonts/OFL-*.txt -t "$pkgdir/usr/share/licenses/$pkgname"
|
|
install -Dm644 crates/musyx/assets/icons/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE-lucide.txt"
|
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
|
}
|