# Copyright 2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Autogenerated by pycargoebuild 0.13.3 EAPI=8 RUST_MIN_VER="1.85.0" CRATES=" alsa-sys@0.4.0 alsa@0.11.0 anstream@1.0.0 anstyle-parse@1.0.0 anstyle-query@1.1.5 anstyle-wincon@3.0.11 anstyle@1.0.14 bitflags@2.13.2 cfg-if@1.0.5 clap-verbosity-flag@3.0.4 clap@4.6.7 clap_builder@4.6.7 clap_derive@4.6.7 clap_lex@1.1.1 colorchoice@1.0.5 configparser@3.3.0 equivalent@1.0.2 errno@0.3.14 hashbrown@0.17.1 heck@0.5.0 indexmap@2.14.2 is_terminal_polyfill@1.70.2 libc@0.2.189 log@0.4.34 once_cell_polyfill@1.70.2 pkg-config@0.3.34 proc-macro2@1.0.107 quote@1.0.47 signal-hook-registry@1.4.8 signal-hook@0.4.4 simple_logger@5.2.0 strsim@0.11.1 syn@3.0.6 unicode-ident@1.0.26 utf8parse@0.2.2 windows-link@0.2.1 windows-sys@0.61.2 " inherit cargo udev systemd DESCRIPTION="Speaker protection daemon for embedded Linux systems" HOMEPAGE="https://github.com/AsahiLinux/speakersafetyd/" SRC_URI="https://github.com/AsahiLinux/speakersafetyd/archive/refs/tags/${PV}.tar.gz -> ${PN}-${PV}.tar.gz ${CARGO_CRATE_URIS}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~arm64" DEPEND=" acct-user/speakersafetyd media-libs/alsa-ucm-conf-asahi " RDEPEND="${DEPEND}" QA_FLAGS_IGNORED="usr/bin/${PN}" src_install() { cargo_src_install emake DESTDIR="${D}" install-data doinitd "${FILESDIR}/speakersafetyd" } pkg_postinst() { udev_reload [[ "${MERGE_TYPE}" == "buildonly" || "$(systemd_is_booted)" == 1 ]] && return elog "speakersafetyd must be running for builtin speakers to function" elog "To enable as a service in OpenRC:" elog "# rc-update add speakersafetyd default" elog "# rc-service speakersafetyd start" elog "On systemd systems, it should be started automatically via a udev rule." } pkg_postrm() { udev_reload }