# Copyright 2024-2026 Gentoo Authors # Distributed under the terms of the MIT License EAPI=8 inherit xdg-utils DESCRIPTION="QBZ headless Qobuz daemon for servers and appliances (prebuilt binary)" HOMEPAGE="https://qbz.lol https://github.com/vicrodh/qbz" MY_PV="${PV}" SRC_URI=" amd64? ( https://github.com/vicrodh/qbz/releases/download/v${MY_PV}/qbzd-${MY_PV}-linux-amd64.tar.gz ) arm64? ( https://github.com/vicrodh/qbz/releases/download/v${MY_PV}/qbzd-${MY_PV}-linux-aarch64.tar.gz ) " LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" # mirror: GitHub-only distfiles — without this Portage 404s through every # official Gentoo mirror before reaching SRC_URI. strip: prebuilt binary, # already stripped at build time; keep Portage's stripper off it. RESTRICT="mirror strip" # qbzd is slint-free: the measured link set is libasound only (+ libc/libm/ # libgcc from the toolchain). pipewire is the runtime device-enumeration # helper (bit-perfect sample-rate queries, DAC detection). RDEPEND=" media-libs/alsa-lib media-video/pipewire " BDEPEND="" # Binary package, no compilation needed QA_PREBUILT="usr/bin/qbzd" S="${WORKDIR}" src_unpack() { default # Tarball extracts to qbzd-${PV}-linux-{amd64|aarch64}/ directory } src_install() { local dir if use amd64; then dir="qbzd-${MY_PV}-linux-amd64" elif use arm64; then dir="qbzd-${MY_PV}-linux-aarch64" fi dobin "${dir}/qbzd" insinto /usr/lib/systemd/user doins "${dir}/qbzd.service" insinto /usr/share/bash-completion/completions newins "${dir}/completions/qbzd.bash" qbzd insinto /usr/share/zsh/site-functions newins "${dir}/completions/qbzd.zsh" _qbzd insinto /usr/share/fish/vendor_completions.d newins "${dir}/completions/qbzd.fish" qbzd dodoc "${dir}/README.md" } pkg_postinst() { elog "Run 'qbzd' once for the setup wizard (or 'qbzd tui')." elog "Optional user service (starts at login):" elog " systemctl --user enable --now qbzd.service" elog " loginctl enable-linger \${USER} # keep it running after logout" }