summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2023-04-28 13:38:05 -0400
committerMatt Turner <mattst88@gentoo.org>2023-04-29 11:02:58 -0400
commit84949d8cc910c2ed1d14838067ad8acd9a782d6e (patch)
treed6ba833419e5968dad70f0f27b081c237ac2f9b2 /sys-power/power-profiles-daemon/power-profiles-daemon-0.13.ebuild
parentkde-apps/pimcommon: Add missing dependency (diff)
downloadgentoo-84949d8cc910c2ed1d14838067ad8acd9a782d6e.tar.gz
gentoo-84949d8cc910c2ed1d14838067ad8acd9a782d6e.tar.bz2
gentoo-84949d8cc910c2ed1d14838067ad8acd9a782d6e.zip
sys-power/power-profiles-daemon: Version bump to 0.13
Signed-off-by: Matt Turner <mattst88@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/30797 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'sys-power/power-profiles-daemon/power-profiles-daemon-0.13.ebuild')
-rw-r--r--sys-power/power-profiles-daemon/power-profiles-daemon-0.13.ebuild77
1 files changed, 77 insertions, 0 deletions
diff --git a/sys-power/power-profiles-daemon/power-profiles-daemon-0.13.ebuild b/sys-power/power-profiles-daemon/power-profiles-daemon-0.13.ebuild
new file mode 100644
index 000000000000..86f286cd8fff
--- /dev/null
+++ b/sys-power/power-profiles-daemon/power-profiles-daemon-0.13.ebuild
@@ -0,0 +1,77 @@
+# 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 ~x86"
+
+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
+ dev-util/gtk-doc
+ )
+ 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
+ newinitd "${FILESDIR}/power-profiles-daemon.initd" power-profiles-daemon
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ if systemd_is_booted; then
+ elog "You need to enable the service:"
+ elog "# systemctl enable ${PN}"
+ else
+ elog "# rc-update add ${PN} default"
+ fi
+ fi
+}