From ff6a93b06c194ac03f924f2a76fd13c18d173550 Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Fri, 1 Dec 2023 14:17:02 -0800 Subject: sys-power/tlp: add 1.6.1 Signed-off-by: Patrick McLean --- sys-power/tlp/Manifest | 1 + sys-power/tlp/tlp-1.6.1.ebuild | 48 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 sys-power/tlp/tlp-1.6.1.ebuild (limited to 'sys-power') diff --git a/sys-power/tlp/Manifest b/sys-power/tlp/Manifest index e6512c67dc16..38fbbac802ee 100644 --- a/sys-power/tlp/Manifest +++ b/sys-power/tlp/Manifest @@ -1,2 +1,3 @@ DIST tlp-1.5.0.tar.gz 126447 BLAKE2B cdd2a5d094d1146a534de07cc646fd428a97f8d40c3d4ed5ec0522848ebe3a4182e36617854feeab7fa8923f7e7ef6797623a09609fdfa2a2b5dda321b188b31 SHA512 93be83f276b902467049160c20a546cdf2f0ec221274bbb4761bf89a8da09f10a494ce2f36379ef9be48ca2e7325de8e582f5dbb823e2ddd339366bae1228122 DIST tlp-1.6.0.tar.gz 143444 BLAKE2B 71e43312583eeb644ffc7daedef1b100be47b44f0e96160f5fe08e3aa0c33958200b8a652e4a3254af828f2e929ba033a0562595e93911dcef460a22fc8674c5 SHA512 66c8fd736912771718da44e2117cfc51ab8ba8c76607cb9de8facbe73a648832a50ac7f00055fa2b315c71ad58762961851d7ccb96b7d8c6451529a7868045db +DIST tlp-1.6.1.tar.gz 143688 BLAKE2B e7ddc8c792bf9911204556f6845da27e0c8722b5dc25b4b855c044a7d6b27662b6bad607532b631ea3766651f43321fda21ca1b51a01955d113ba838700d0182 SHA512 de88c4b4ae7d742eeec2bce7e43ccd99f971620541edc416471a46cb76a4f0c072821348d6c7f7fc44e7c70f2e3cde231d74546424ece533b2b2f531aee22b79 diff --git a/sys-power/tlp/tlp-1.6.1.ebuild b/sys-power/tlp/tlp-1.6.1.ebuild new file mode 100644 index 000000000000..943ae6fe8d78 --- /dev/null +++ b/sys-power/tlp/tlp-1.6.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2023 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_ELOD=/$(get_libdir)/elogind/system-sleep \ + 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 +} -- cgit v1.2.3-65-gdbad