diff options
author | Pacho Ramos <pacho@gentoo.org> | 2023-03-03 15:06:54 +0100 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2023-03-03 15:10:31 +0100 |
commit | d3fdfced84b6caadf8d043ace295c5f4282361ee (patch) | |
tree | 46cd5f08831b53dbedd323dbe689cb5c7e965698 /sys-power/power-profiles-daemon | |
parent | sys-power/switcheroo-control: Fix typos (diff) | |
download | gentoo-d3fdfced84b6caadf8d043ace295c5f4282361ee.tar.gz gentoo-d3fdfced84b6caadf8d043ace295c5f4282361ee.tar.bz2 gentoo-d3fdfced84b6caadf8d043ace295c5f4282361ee.zip |
sys-power/power-profiles-daemon: new package, add 0.12
Bug: https://bugs.gentoo.org/887233
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'sys-power/power-profiles-daemon')
-rw-r--r-- | sys-power/power-profiles-daemon/Manifest | 1 | ||||
-rw-r--r-- | sys-power/power-profiles-daemon/metadata.xml | 11 | ||||
-rw-r--r-- | sys-power/power-profiles-daemon/power-profiles-daemon-0.12.ebuild | 71 |
3 files changed, 83 insertions, 0 deletions
diff --git a/sys-power/power-profiles-daemon/Manifest b/sys-power/power-profiles-daemon/Manifest new file mode 100644 index 000000000000..d954634f4b92 --- /dev/null +++ b/sys-power/power-profiles-daemon/Manifest @@ -0,0 +1 @@ +DIST power-profiles-daemon-0.12.tar.bz2 47846 BLAKE2B 7fb10e78c5ab6da32a4b460c8046e510c66bb0d31ca4c7e14db5772c547c420be078f3086b6b98e70063fed0924e783f5b26580a97e0898474040a2724b87f91 SHA512 d34e51deeed13ed307b9efac08336ce36879d7deeac5af803207d1c69f641993a509d96e149c3f150c5d20437867f3cbc6502fce6f63e08f0b23f23c7f90d948 diff --git a/sys-power/power-profiles-daemon/metadata.xml b/sys-power/power-profiles-daemon/metadata.xml new file mode 100644 index 000000000000..243eab2cfba6 --- /dev/null +++ b/sys-power/power-profiles-daemon/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>pacho@gentoo.org</email> + <name>Pacho Ramos</name> + </maintainer> + <upstream> + <remote-id type="freedesktop-gitlab">hadess/power-profiles-daemon</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/power-profiles-daemon/power-profiles-daemon-0.12.ebuild b/sys-power/power-profiles-daemon/power-profiles-daemon-0.12.ebuild new file mode 100644 index 000000000000..6e3f67c1abf2 --- /dev/null +++ b/sys-power/power-profiles-daemon/power-profiles-daemon-0.12.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{9..11} ) + +inherit meson python-single-r1 systemd + +DESCRIPTION="Makes power profiles handling available over D-Bus" +HOMEPAGE="https://gitlab.freedesktop.org/hadess/power-profiles-daemon/" +SRC_URI="https://gitlab.freedesktop.org/hadess/${PN}/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="gtk-doc test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') + dev-libs/glib:2 + >=dev-libs/libgudev-234 + >=sys-auth/polkit-0.114 + sys-power/upower +" +DEPEND="${RDEPEND}" +BDEPEND=" + gtk-doc? ( dev-util/gi-docgen ) + test? ( + dev-util/umockdev + $(python_gen_cond_dep ' + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/python-dbusmock[${PYTHON_USEDEP}] + ') + ) +" + +python_check_deps() { + if use test; then + python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]" && + python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" + else + python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" + fi +} + +src_configure() { + local emesonargs=( + -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)" + $(meson_use gtk-doc gtk_doc) + $(meson_use test tests) + ) + meson_src_configure +} + +src_install() { + meson_src_install + python_fix_shebang "${D}"/usr/bin/powerprofilesctl +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + if systemd_is_booted; then + elog "You need to enable the service:" + elog "# systemctl enable ${PN}" + fi + fi +} |