public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-power/tlp/files/, sys-power/tlp/
@ 2022-10-12 23:41 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-10-12 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     bce5e1909085a0bc5ccc307e2d8b97884b0e8ae1
Author:     Jay Faulkner <jay <AT> jvf <DOT> cc>
AuthorDate: Thu Sep 15 01:15:52 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 12 23:38:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bce5e190

sys-power/tlp: new package, add 1.5.0

This is a direct import from ::guru, with the only changes being
to metadata.xml to propose myself as proxy maintainer.

Signed-off-by: Jay Faulkner <jay <AT> jvf.cc>
Closes: https://github.com/gentoo/gentoo/pull/27260
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-power/tlp/Manifest         |  1 +
 sys-power/tlp/files/tlp.init   | 28 +++++++++++++++++++++++
 sys-power/tlp/metadata.xml     | 23 +++++++++++++++++++
 sys-power/tlp/tlp-1.5.0.ebuild | 50 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)

diff --git a/sys-power/tlp/Manifest b/sys-power/tlp/Manifest
new file mode 100644
index 000000000000..5cddbd3add64
--- /dev/null
+++ b/sys-power/tlp/Manifest
@@ -0,0 +1 @@
+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
new file mode 100644
index 000000000000..f50de9029e7b
--- /dev/null
+++ b/sys-power/tlp/files/tlp.init
@@ -0,0 +1,28 @@
+#!/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
new file mode 100644
index 000000000000..d7cf4d588720
--- /dev/null
+++ b/sys-power/tlp/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+	<maintainer type="person" proxied="yes">
+		<email>jay@jvf.cc</email>
+		<name>Jay Faulkner</name>
+	</maintainer>
+		<maintainer type="person" proxied="yes">
+		<email>duje.mihanovic@skole.hr</email>
+		<name>Duje Mihanović</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<longdescription lang="en">
+		TLP is a command line utility for Linux to optimize laptop battery life. Primarily by tweaking
+		kernel settings that affect power consumption.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">linrunner/TLP</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/sys-power/tlp/tlp-1.5.0.ebuild b/sys-power/tlp/tlp-1.5.0.ebuild
new file mode 100644
index 000000000000..8eb8387f0e60
--- /dev/null
+++ b/sys-power/tlp/tlp-1.5.0.ebuild
@@ -0,0 +1,50 @@
+# 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"
+
+# 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
+	dev-lang/perl
+	|| ( sys-auth/elogind sys-apps/systemd )"
+
+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

* [gentoo-commits] repo/gentoo:master commit in: sys-power/tlp/files/, sys-power/tlp/
@ 2022-11-12  6:15 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-11-12  6:15 UTC (permalink / raw
  To: gentoo-commits

commit:     bec8795a12a9cf5480980828934492ad471ba278
Author:     Jay Faulkner <jay <AT> jvf <DOT> cc>
AuthorDate: Sat Nov 12 06:07:16 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 12 06:14:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bec8795a

sys-power/tlp: Fix incorrect use of elog in init

Instead, we use einfo, which actually exists.

Closes: https://bugs.gentoo.org/877409
Signed-off-by: Jay Faulkner <jay <AT> jvf.cc>
Closes: https://github.com/gentoo/gentoo/pull/28239
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-power/tlp/files/tlp.init                               | 2 +-
 sys-power/tlp/{tlp-1.5.0-r1.ebuild => tlp-1.5.0-r2.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-power/tlp/files/tlp.init b/sys-power/tlp/files/tlp.init
index f50de9029e7b..27b60dfeab13 100644
--- a/sys-power/tlp/files/tlp.init
+++ b/sys-power/tlp/files/tlp.init
@@ -20,7 +20,7 @@ reload() {
 }
 
 stop() {
-	elog "Reboot to stop tlp."
+	einfo "Reboot to stop tlp."
 }
 
 stat() {

diff --git a/sys-power/tlp/tlp-1.5.0-r1.ebuild b/sys-power/tlp/tlp-1.5.0-r2.ebuild
similarity index 100%
rename from sys-power/tlp/tlp-1.5.0-r1.ebuild
rename to sys-power/tlp/tlp-1.5.0-r2.ebuild


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

end of thread, other threads:[~2022-11-12  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-12  6:15 [gentoo-commits] repo/gentoo:master commit in: sys-power/tlp/files/, sys-power/tlp/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-10-12 23:41 Sam James

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