commit:     a0b742acaca98619e458e0161cc9b8fc93da0d4f
Author:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 13 15:50:09 2025 +0000
Commit:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
CommitDate: Mon Oct 13 15:51:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0b742ac

sys-power/tlp: add 1.8.0-r1

Minor bugfix to last update, properly using the two-pacakge syntax for
optfeature so it's less confusing. Also, after conversation in
gentoo-dev IRC, it seemed prudent to revbump but leave the package
stable.

Signed-off-by: Jay Faulkner <jayf <AT> gentoo.org>

 sys-power/tlp/tlp-1.8.0-r1.ebuild | 50 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/sys-power/tlp/tlp-1.8.0-r1.ebuild 
b/sys-power/tlp/tlp-1.8.0-r1.ebuild
new file mode 100644
index 000000000000..4c3ac97819fc
--- /dev/null
+++ b/sys-power/tlp/tlp-1.8.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2025 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"
+
+RDEPEND="
+       dev-lang/perl
+       virtual/udev
+"
+
+src_install() {
+       # NOTE(JayF): TLP_WITH_ELOGIND/TLP_WITH_SYSTEMD are both only installing
+       #             small init/config files.
+       local myemakeargs=(
+               DESTDIR="${D}"
+               TLP_NO_INIT=1
+               TLP_ELOD=/usr/lib/elogind/system-sleep
+               TLP_WITH_ELOGIND=1
+               TLP_WITH_SYSTEMD=1
+               install install-man
+       )
+       emake "${myemakeargs[@]}"
+
+       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
+       optfeature "Sleep hooks" sys-auth/elogind sys-apps/systemd
+}
+
+pkg_postrm() {
+       udev_reload
+}

Reply via email to