Gentoo Archives: gentoo-commits

From: Jay Faulkner <jay@×××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-power/tlp/, sys-power/tlp/files/
Date: Sun, 28 Aug 2022 05:29:32
Message-Id: 1661664538.01c3100ab2fbccb88ce6157b04d1855bd29f87ee.jayf@gentoo
1 commit: 01c3100ab2fbccb88ce6157b04d1855bd29f87ee
2 Author: Jay Faulkner <jay <AT> jvf <DOT> cc>
3 AuthorDate: Sun Aug 28 04:53:40 2022 +0000
4 Commit: Jay Faulkner <jay <AT> jvf <DOT> cc>
5 CommitDate: Sun Aug 28 05:28:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=01c3100a
7
8 sys-power/tlp: Fix systemd support
9
10 Prior to this change, systemd units were not properly installed.
11
12 Additional style and simplification fixes as needed.
13
14 Signed-off-by: Jay Faulkner <jay <AT> jvf.cc>
15
16 sys-power/tlp/files/tlp-1.5.0-Makefile.patch | 18 ------------------
17 sys-power/tlp/tlp-1.5.0.ebuild | 21 +++------------------
18 2 files changed, 3 insertions(+), 36 deletions(-)
19
20 diff --git a/sys-power/tlp/files/tlp-1.5.0-Makefile.patch b/sys-power/tlp/files/tlp-1.5.0-Makefile.patch
21 deleted file mode 100644
22 index 58667ee21..000000000
23 --- a/sys-power/tlp/files/tlp-1.5.0-Makefile.patch
24 +++ /dev/null
25 @@ -1,18 +0,0 @@
26 -diff --git a/Makefile b/Makefile
27 -index b81451c..d154b6b 100644
28 ---- a/Makefile
29 -+++ b/Makefile
30 -@@ -14,10 +14,10 @@ TLP_CONFDIR ?= /etc/tlp.d
31 - TLP_CONFDEF ?= /usr/share/tlp/defaults.conf
32 - TLP_CONFREN ?= /usr/share/tlp/rename.conf
33 - TLP_CONF ?= /etc/default/tlp
34 --TLP_SYSD ?= /lib/systemd/system
35 --TLP_SDSL ?= /lib/systemd/system-sleep
36 -+TLP_SYSD ?= /@LIBDIR@/systemd/system
37 -+TLP_SDSL ?= /@LIBDIR@/systemd/system-sleep
38 - TLP_SYSV ?= /etc/init.d
39 --TLP_ELOD ?= /lib/elogind/system-sleep
40 -+TLP_ELOD ?= /@LIBDIR@/elogind/system-sleep
41 - TLP_SHCPL ?= /usr/share/bash-completion/completions
42 - TLP_MAN ?= /usr/share/man
43 - TLP_META ?= /usr/share/metainfo
44
45 diff --git a/sys-power/tlp/tlp-1.5.0.ebuild b/sys-power/tlp/tlp-1.5.0.ebuild
46 index d2cc2f1fe..0fc6f0d01 100644
47 --- a/sys-power/tlp/tlp-1.5.0.ebuild
48 +++ b/sys-power/tlp/tlp-1.5.0.ebuild
49 @@ -20,29 +20,14 @@ RDEPEND="virtual/udev
50 systemd? ( sys-apps/systemd )"
51 DEPEND="${RDEPEND}"
52 REQUIRED_USE="?? ( elogind systemd )"
53 -PATCHES="${FILESDIR}/${PN}-1.5.0-Makefile.patch"
54 -CONFIG_PROTECT="/etc/tlp.conf /etc/tlp.d"
55 -
56 -src_prepare() {
57 - default
58 - sed -i "s/@LIBDIR@/$(get_libdir)/g" "${S}/Makefile"
59 -}
60 -
61 -src_compile() {
62 - emake
63 -}
64
65 src_install() {
66 - if use bash-completion; then export bashcomp=0; else export bashcomp=1; fi
67 - if use elogind; then export elogind=1; else export elogind=0; fi
68 - if use systemd; then export systemd=1; else export systemd=0; fi
69 -
70 emake \
71 DESTDIR="${D}" \
72 TLP_NO_INIT=1 \
73 - TLP_NO_BASHCOMP=$bashcomp \
74 - TLP_WITH_ELOGIND=$elogind \
75 - TLP_WITH_SYSTEMD=$systemd \
76 + TLP_NO_BASHCOMP=$(usex bash-completion 0 1) \
77 + TLP_WITH_ELOGIND=$(usex elogind 1 0) \
78 + TLP_WITH_SYSTEMD=$(usex systemd 1 0) \
79 install install-man
80
81 chmod 444 "${D}/usr/share/tlp/defaults.conf" # manpage says this file should not be edited