1 |
commit: d3fdfced84b6caadf8d043ace295c5f4282361ee |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 3 14:06:54 2023 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 3 14:10:31 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3fdfced |
7 |
|
8 |
sys-power/power-profiles-daemon: new package, add 0.12 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/887233 |
11 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
12 |
|
13 |
sys-power/power-profiles-daemon/Manifest | 1 + |
14 |
sys-power/power-profiles-daemon/metadata.xml | 11 ++++ |
15 |
.../power-profiles-daemon-0.12.ebuild | 71 ++++++++++++++++++++++ |
16 |
3 files changed, 83 insertions(+) |
17 |
|
18 |
diff --git a/sys-power/power-profiles-daemon/Manifest b/sys-power/power-profiles-daemon/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000000..d954634f4b92 |
21 |
--- /dev/null |
22 |
+++ b/sys-power/power-profiles-daemon/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST power-profiles-daemon-0.12.tar.bz2 47846 BLAKE2B 7fb10e78c5ab6da32a4b460c8046e510c66bb0d31ca4c7e14db5772c547c420be078f3086b6b98e70063fed0924e783f5b26580a97e0898474040a2724b87f91 SHA512 d34e51deeed13ed307b9efac08336ce36879d7deeac5af803207d1c69f641993a509d96e149c3f150c5d20437867f3cbc6502fce6f63e08f0b23f23c7f90d948 |
25 |
|
26 |
diff --git a/sys-power/power-profiles-daemon/metadata.xml b/sys-power/power-profiles-daemon/metadata.xml |
27 |
new file mode 100644 |
28 |
index 000000000000..243eab2cfba6 |
29 |
--- /dev/null |
30 |
+++ b/sys-power/power-profiles-daemon/metadata.xml |
31 |
@@ -0,0 +1,11 @@ |
32 |
+<?xml version="1.0" encoding="UTF-8"?> |
33 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
34 |
+<pkgmetadata> |
35 |
+ <maintainer type="person"> |
36 |
+ <email>pacho@g.o</email> |
37 |
+ <name>Pacho Ramos</name> |
38 |
+ </maintainer> |
39 |
+ <upstream> |
40 |
+ <remote-id type="freedesktop-gitlab">hadess/power-profiles-daemon</remote-id> |
41 |
+ </upstream> |
42 |
+</pkgmetadata> |
43 |
|
44 |
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 |
45 |
new file mode 100644 |
46 |
index 000000000000..6e3f67c1abf2 |
47 |
--- /dev/null |
48 |
+++ b/sys-power/power-profiles-daemon/power-profiles-daemon-0.12.ebuild |
49 |
@@ -0,0 +1,71 @@ |
50 |
+# Copyright 1999-2023 Gentoo Authors |
51 |
+# Distributed under the terms of the GNU General Public License v2 |
52 |
+ |
53 |
+EAPI=8 |
54 |
+PYTHON_COMPAT=( python3_{9..11} ) |
55 |
+ |
56 |
+inherit meson python-single-r1 systemd |
57 |
+ |
58 |
+DESCRIPTION="Makes power profiles handling available over D-Bus" |
59 |
+HOMEPAGE="https://gitlab.freedesktop.org/hadess/power-profiles-daemon/" |
60 |
+SRC_URI="https://gitlab.freedesktop.org/hadess/${PN}/-/archive/${PV}/${P}.tar.bz2" |
61 |
+ |
62 |
+LICENSE="GPL-3+" |
63 |
+SLOT="0" |
64 |
+KEYWORDS="~amd64" |
65 |
+ |
66 |
+IUSE="gtk-doc test" |
67 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
68 |
+ |
69 |
+RESTRICT="!test? ( test )" |
70 |
+ |
71 |
+RDEPEND="${PYTHON_DEPS} |
72 |
+ $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') |
73 |
+ dev-libs/glib:2 |
74 |
+ >=dev-libs/libgudev-234 |
75 |
+ >=sys-auth/polkit-0.114 |
76 |
+ sys-power/upower |
77 |
+" |
78 |
+DEPEND="${RDEPEND}" |
79 |
+BDEPEND=" |
80 |
+ gtk-doc? ( dev-util/gi-docgen ) |
81 |
+ test? ( |
82 |
+ dev-util/umockdev |
83 |
+ $(python_gen_cond_dep ' |
84 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
85 |
+ dev-python/python-dbusmock[${PYTHON_USEDEP}] |
86 |
+ ') |
87 |
+ ) |
88 |
+" |
89 |
+ |
90 |
+python_check_deps() { |
91 |
+ if use test; then |
92 |
+ python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]" && |
93 |
+ python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
94 |
+ else |
95 |
+ python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
96 |
+ fi |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ local emesonargs=( |
101 |
+ -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)" |
102 |
+ $(meson_use gtk-doc gtk_doc) |
103 |
+ $(meson_use test tests) |
104 |
+ ) |
105 |
+ meson_src_configure |
106 |
+} |
107 |
+ |
108 |
+src_install() { |
109 |
+ meson_src_install |
110 |
+ python_fix_shebang "${D}"/usr/bin/powerprofilesctl |
111 |
+} |
112 |
+ |
113 |
+pkg_postinst() { |
114 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
115 |
+ if systemd_is_booted; then |
116 |
+ elog "You need to enable the service:" |
117 |
+ elog "# systemctl enable ${PN}" |
118 |
+ fi |
119 |
+ fi |
120 |
+} |