public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: sys-power/tlp/, sys-power/tlp/files/
@ 2022-08-28  5:29 Jay Faulkner
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Faulkner @ 2022-08-28  5:29 UTC (permalink / raw
  To: gentoo-commits

commit:     01c3100ab2fbccb88ce6157b04d1855bd29f87ee
Author:     Jay Faulkner <jay <AT> jvf <DOT> cc>
AuthorDate: Sun Aug 28 04:53:40 2022 +0000
Commit:     Jay Faulkner <jay <AT> jvf <DOT> cc>
CommitDate: Sun Aug 28 05:28:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=01c3100a

sys-power/tlp: Fix systemd support

Prior to this change, systemd units were not properly installed.

Additional style and simplification fixes as needed.

Signed-off-by: Jay Faulkner <jay <AT> jvf.cc>

 sys-power/tlp/files/tlp-1.5.0-Makefile.patch | 18 ------------------
 sys-power/tlp/tlp-1.5.0.ebuild               | 21 +++------------------
 2 files changed, 3 insertions(+), 36 deletions(-)

diff --git a/sys-power/tlp/files/tlp-1.5.0-Makefile.patch b/sys-power/tlp/files/tlp-1.5.0-Makefile.patch
deleted file mode 100644
index 58667ee21..000000000
--- a/sys-power/tlp/files/tlp-1.5.0-Makefile.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/Makefile b/Makefile
-index b81451c..d154b6b 100644
---- a/Makefile
-+++ b/Makefile
-@@ -14,10 +14,10 @@ TLP_CONFDIR ?= /etc/tlp.d
- TLP_CONFDEF ?= /usr/share/tlp/defaults.conf
- TLP_CONFREN ?= /usr/share/tlp/rename.conf
- TLP_CONF    ?= /etc/default/tlp
--TLP_SYSD    ?= /lib/systemd/system
--TLP_SDSL    ?= /lib/systemd/system-sleep
-+TLP_SYSD    ?= /@LIBDIR@/systemd/system
-+TLP_SDSL    ?= /@LIBDIR@/systemd/system-sleep
- TLP_SYSV    ?= /etc/init.d
--TLP_ELOD    ?= /lib/elogind/system-sleep
-+TLP_ELOD    ?= /@LIBDIR@/elogind/system-sleep
- TLP_SHCPL   ?= /usr/share/bash-completion/completions
- TLP_MAN     ?= /usr/share/man
- TLP_META    ?= /usr/share/metainfo

diff --git a/sys-power/tlp/tlp-1.5.0.ebuild b/sys-power/tlp/tlp-1.5.0.ebuild
index d2cc2f1fe..0fc6f0d01 100644
--- a/sys-power/tlp/tlp-1.5.0.ebuild
+++ b/sys-power/tlp/tlp-1.5.0.ebuild
@@ -20,29 +20,14 @@ RDEPEND="virtual/udev
 		systemd? ( sys-apps/systemd )"
 DEPEND="${RDEPEND}"
 REQUIRED_USE="?? ( elogind systemd )"
-PATCHES="${FILESDIR}/${PN}-1.5.0-Makefile.patch"
-CONFIG_PROTECT="/etc/tlp.conf /etc/tlp.d"
-
-src_prepare() {
-	default
-	sed -i "s/@LIBDIR@/$(get_libdir)/g" "${S}/Makefile"
-}
-
-src_compile() {
-	emake
-}
 
 src_install() {
-	if use bash-completion; then export bashcomp=0; else export bashcomp=1; fi
-	if use elogind; then export elogind=1; else export elogind=0; fi
-	if use systemd; then export systemd=1; else export systemd=0; fi
-
 	emake \
 		DESTDIR="${D}" \
 		TLP_NO_INIT=1 \
-		TLP_NO_BASHCOMP=$bashcomp \
-		TLP_WITH_ELOGIND=$elogind \
-		TLP_WITH_SYSTEMD=$systemd \
+		TLP_NO_BASHCOMP=$(usex bash-completion 0 1) \
+		TLP_WITH_ELOGIND=$(usex elogind 1 0) \
+		TLP_WITH_SYSTEMD=$(usex systemd 1 0) \
 		install install-man
 
 	chmod 444 "${D}/usr/share/tlp/defaults.conf" # manpage says this file should not be edited


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sys-power/tlp/, sys-power/tlp/files/
@ 2022-10-13 23:05 Jay Faulkner
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Faulkner @ 2022-10-13 23:05 UTC (permalink / raw
  To: gentoo-commits

commit:     49bd36df466d5f61e857a6a2084925efbcf73de3
Author:     Jay Faulkner <jay <AT> jvf <DOT> cc>
AuthorDate: Thu Oct 13 23:03:23 2022 +0000
Commit:     Jay Faulkner <jay <AT> jvf <DOT> cc>
CommitDate: Thu Oct 13 23:05:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=49bd36df

sys-power/tlp: treeclean

Imported to ::gentoo in bce5e19

Signed-off-by: Jay Faulkner <jay <AT> jvf.cc>

 sys-power/tlp/Manifest         |  1 -
 sys-power/tlp/files/tlp.init   | 28 ---------------------------
 sys-power/tlp/metadata.xml     |  8 --------
 sys-power/tlp/tlp-1.5.0.ebuild | 44 ------------------------------------------
 4 files changed, 81 deletions(-)

diff --git a/sys-power/tlp/Manifest b/sys-power/tlp/Manifest
deleted file mode 100644
index 5cddbd3ad..000000000
--- a/sys-power/tlp/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST tlp-1.5.0.tar.gz 126447 BLAKE2B cdd2a5d094d1146a534de07cc646fd428a97f8d40c3d4ed5ec0522848ebe3a4182e36617854feeab7fa8923f7e7ef6797623a09609fdfa2a2b5dda321b188b31 SHA512 93be83f276b902467049160c20a546cdf2f0ec221274bbb4761bf89a8da09f10a494ce2f36379ef9be48ca2e7325de8e582f5dbb823e2ddd339366bae1228122

diff --git a/sys-power/tlp/files/tlp.init b/sys-power/tlp/files/tlp.init
deleted file mode 100644
index f50de9029..000000000
--- a/sys-power/tlp/files/tlp.init
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/sbin/openrc-run
-command=/usr/sbin/tlp
-name="TLP"
-extra_started_commands="reload stat"
-
-depend() {
-	need udev
-}
-
-start() {
-	ebegin "Starting tlp..."
-	$command init start
-	eend $?
-}
-
-reload() {
-	ebegin "Reloading tlp's configuration..."
-	$command start
-	eend $?
-}
-
-stop() {
-	elog "Reboot to stop tlp."
-}
-
-stat() {
-	/usr/bin/tlp-stat
-}

diff --git a/sys-power/tlp/metadata.xml b/sys-power/tlp/metadata.xml
deleted file mode 100644
index 62988a0d4..000000000
--- a/sys-power/tlp/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
-<pkgmetadata>
-	<maintainer type="person">
-		<email>duje.mihanovic@skole.hr</email>
-		<name>Duje Mihanović</name>
-	</maintainer>
-</pkgmetadata>

diff --git a/sys-power/tlp/tlp-1.5.0.ebuild b/sys-power/tlp/tlp-1.5.0.ebuild
deleted file mode 100644
index bf18bbbb7..000000000
--- a/sys-power/tlp/tlp-1.5.0.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit udev optfeature
-
-DESCRIPTION="Optimize laptop battery life"
-HOMEPAGE="https://linrunner.de/tlp/"
-SRC_URI="https://github.com/linrunner/TLP/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/TLP-${PV}"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="mirror"
-# It's uncertain if elogind/systemd is actually required, however, without the sleep
-# hooks working, which require one of them, it doesn't seem like this app is very useful.
-RDEPEND="virtual/udev
-		|| ( sys-auth/elogind sys-apps/systemd )"
-DEPEND="${RDEPEND}"
-
-src_install() {
-	emake \
-		DESTDIR="${D}" \
-		TLP_NO_INIT=1 \
-		TLP_WITH_ELOGIND=1 \
-		TLP_WITH_SYSTEMD=1 \
-		install install-man
-
-	fperms 444 "/usr/share/tlp/defaults.conf" # manpage says this file should not be edited
-	newinitd "${FILESDIR}/tlp.init" tlp
-	keepdir "/var/lib/tlp" # created by Makefile, probably important
-}
-
-pkg_postinst() {
-	udev_reload
-
-	optfeature "disable Wake-on-LAN" sys-apps/ethtool
-	optfeature "see disk drive health info in tlp-stat" sys-apps/smartmontools
-}
-
-pkg_postrm() {
-	udev_reload
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-13 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13 23:05 [gentoo-commits] repo/proj/guru:dev commit in: sys-power/tlp/, sys-power/tlp/files/ Jay Faulkner
  -- strict thread matches above, loose matches on Subject: below --
2022-08-28  5:29 Jay Faulkner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox