summaryrefslogtreecommitdiff
path: root/sys-power/tlp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-13 07:41:53 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-13 07:41:53 +0100
commit4b91667ebe695e6fdfbef3962d099f17484b8806 (patch)
tree0af842488d683612bd9eae3f406ec839bcbc0cf9 /sys-power/tlp
parentb89a664f266dab3b9b5ddac2cb874f8869142370 (diff)
gentoo auto-resync : 13:10:2022 - 07:41:53
Diffstat (limited to 'sys-power/tlp')
-rw-r--r--sys-power/tlp/Manifest4
-rw-r--r--sys-power/tlp/files/tlp.init28
-rw-r--r--sys-power/tlp/metadata.xml23
-rw-r--r--sys-power/tlp/tlp-1.5.0.ebuild47
4 files changed, 102 insertions, 0 deletions
diff --git a/sys-power/tlp/Manifest b/sys-power/tlp/Manifest
new file mode 100644
index 000000000000..b7dc38c0ffcf
--- /dev/null
+++ b/sys-power/tlp/Manifest
@@ -0,0 +1,4 @@
+AUX tlp.init 336 BLAKE2B a9a1bc7da9d35c51965172147843df4458e110d61f31413e1bedcfdd4ca5e253a0612021eddc1f99978ff7c7b5fb9e3a06b07eb0e5b236aec71dd0f7d96a9fc1 SHA512 cf3d050c2bc0f9f3110152ea340ef6d6f49efe522f8d412f374d365508ffcd9b31d9c76c6b0e620ce93c97bc41509822c7a0b0a2078d1ea48897ebb85d68c278
+DIST tlp-1.5.0.tar.gz 126447 BLAKE2B cdd2a5d094d1146a534de07cc646fd428a97f8d40c3d4ed5ec0522848ebe3a4182e36617854feeab7fa8923f7e7ef6797623a09609fdfa2a2b5dda321b188b31 SHA512 93be83f276b902467049160c20a546cdf2f0ec221274bbb4761bf89a8da09f10a494ce2f36379ef9be48ca2e7325de8e582f5dbb823e2ddd339366bae1228122
+EBUILD tlp-1.5.0.ebuild 1149 BLAKE2B d33a3efa3cb28823dd482062d817778fbdb34071f7a8cd0a8041cb73d4859c942943bdc87cc07873a8ef17b45527ffda3b0878161cf3bf79131d251a9036f740 SHA512 7630701b441907715e93d155ccbdf59a67dfd028856a646f8242f1543a5c7f6a7a323ba3dd1fd4b7f8f273c1c622a4d7ba2479e8cd6e8193ea31c2d761ae77b0
+MISC metadata.xml 789 BLAKE2B e58d72677feb289eb8aa59f352170b10e270edd772908f2be494bdcbf4bcf448041cfcf2894c23389071e849653a457bb384e946083bb4f76e89825ada3f7b0a SHA512 f0da5d455a6e21e466d4af3ec5e8bdcab820de4dac2778ba7f1e5175e8e01aa5ccd5ff3c292e058758ec306243545de61300a1fe479312739754255b676da666
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..58c6a1db7a7d
--- /dev/null
+++ b/sys-power/tlp/tlp-1.5.0.ebuild
@@ -0,0 +1,47 @@
+# 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="
+ dev-lang/perl
+ virtual/udev
+ || ( 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
+}