sys-power/system76-power: sync live ebuild

* add missing dependencies
* update LICENSE
* fix installs where binary doesn't lie in target/release, e.g.
  debug builds
* restore EPREFIX compat

Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2025-06-05 15:46:11 +02:00
parent 721d25e914
commit 4a066835fb
2 changed files with 52 additions and 12 deletions

View File

@@ -218,6 +218,7 @@ DIST syn-1.0.109.crate 237611 BLAKE2B e827445d00c79a8eeb91eacde472f1987addd6ce9e
DIST syn-2.0.100.crate 297947 BLAKE2B 50a9b244732eebc16464bef152bb620d86aba590942b0d68710d36e89c0ee752629be5bb8db48866c7d252d545ab910625891a5a9b499ad9142191881eb9b42b SHA512 082a975c6448febe38abdc0b43ae929a97a303c0f980ecd2bdd6c44aa2b39ee5aeedf6b1c84316cf088e0d97aff011ec0482a5242ddb338dcf7db5d55926cf6c
DIST syn-2.0.60.crate 255808 BLAKE2B d7a8e415dd72267fd92da48ba8b3e6feb728f0639797db1aa74aeaa2a57935b7565eec37cbd32eec826154e2c54075b121737369eb15af36c322c34b3cfd7930 SHA512 20bfa02b03c193672a9922f9a5e196185341e082a262f7c00d7c2d467d9e2d77f4af3994634923cfaeee34aa9eab510415165f052ffd9b1ed0b1b581e272898d
DIST sysfs-class-0.1.3.crate 8806 BLAKE2B 34f96dd9cd438cbd9a1f1efe7abdadbf7294aef57d7ca6e0b8577d96e25609f4b015f27344e44a051e7fc44cbeb1345cd11a58ef4c719ff9c31d6f8e65c5a59a SHA512 0d65cf8518878222aa11e9d9f31569d42f5f72cfbde283399a09432f1e3021d384fca93b9c7362f72a4af0f10220accbdf0ecbeaa485e5c6eb4aadbafcb83a4b
DIST sysfs-class-ab63e7f638aadfaf896a02e53cf330343d331337.gh.tar.gz 8491 BLAKE2B 1615e4128dc99ecf6b2bedbde38744d47cc209ca92c312389f3f9d53d84dda2b5b2e4de82248efdc29a220bb210f29b536b475a2fb238a0c0fed9fa7dc8d7143 SHA512 a301080f6a46e87fa09cb9007b603706a11bd5b16b4a745f7a242347d8ea6ca7514f16837efba72737f7a30e5eaa69ca50fab439eb3030a9fa7407c90c375426
DIST system76-power-1.2.1.tar.gz 65344 BLAKE2B 5cb396ec23e568568d5db007b464c346091b1742a4660c4baa4f12a5d2d59e76b52b25bbcfecda22b2fef7454d954a8b9f80835b317bb8e05b8350cbed8a35e1 SHA512 fee8e9165735f25d3a9160522e1a0b72f8bf28e48c56bdac611f93c2b317cd0dd0df380dd1900cb8b97fbf9c514fc316884cb3c81be87adeea0a7ceeeb43bc7a
DIST system76-power-1.2.4.tar.gz 66231 BLAKE2B cec2d18d24ce8d7b8bbd8c48d8753793c9d2408152d1ac2d72c04933704890bb4890008b3c6f3ac6fe14101c9f4fafea4cc2180f1ae291678b198a1cf9895bbd SHA512 598117aa86a92cf9e2a773acf5e6087f093b7cf535f9b0b0338ca31d41a685c146c763098254e164e4321cb25f38a3c25e352d7b17036cda774674dce9222554
DIST tempfile-3.10.1.crate 33653 BLAKE2B 819b183e7840f70270883ee8b6a91fa09861c3112eaadc65007199885abe099bd593e1cdc4d9ab48c23490a6d484cad9bf0e80cf4e718c369cc2418b72eaf09c SHA512 bac7515b85b0d01ea914b527f0fadd3a4d8e77c9eabe786977d2625d8a3e91decaec502dd15bab4d49a43597fa7cf7660fff4be1b043112d13b542a72443bf39

View File

@@ -1,32 +1,71 @@
# Copyright 2022-2024 Gentoo Authors
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cargo git-r3
CRATES=""
DESCRIPTION="System76 Power Management Tool for systemd"
inherit cargo
DESCRIPTION="System76 Power Management Tool"
HOMEPAGE="https://github.com/pop-os/system76-power"
EGIT_REPO_URI="https://github.com/pop-os/system76-power"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/pop-os/system76-power"
else
SRC_URI="
https://github.com/pop-os/system76-power/archive/refs/tags/${PV}.tar.gz
-> ${P}.tar.gz
${CARGO_CRATE_URIS}
"
KEYWORDS="~amd64"
fi
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
DEPEND="
dev-libs/libusb:1
# Dependent crate licenses
LICENSE+="
BSD ISC MIT Unicode-DFS-2016
|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
DEPEND="virtual/libusb:1"
RDEPEND="
${DEPEND}
sys-apps/dbus
sys-auth/polkit
"
BDEPEND="virtual/pkgconfig"
src_unpack(){
git-r3_src_unpack
cargo_live_src_unpack
if [[ ${PV} == *9999* ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_prepare() {
# Install the Rust binary using the cargo eclass as the Makefile hardcodes the release path
sed -i '/\s*install -D -m 0755/d' Makefile || die
default
}
src_configure() {
if [[ ${PV} == *9999* ]]; then
# prevent network access during src_install due to git crate sysfs-class
cargo_src_configure --frozen
else
cargo_src_configure
fi
}
src_install(){
default
cargo_src_install
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
elog "Enable the service: 'systemctl enable --now com.system76.PowerDaemon.service'"
}