diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-16 10:53:11 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-16 10:53:11 -0500 |
| commit | 8e65dc62f3f9f6b8f7b890fefedbf4ac05dfde0b (patch) | |
| tree | bb1e83c18d1cc77cdebfc5aeb9b12ad39c9787b5 /sys-power/tlp | |
| parent | f997c3ee588099e4f43e9ec845935868e3e60b8e (diff) | |
| download | baldeagleos-repo-8e65dc62f3f9f6b8f7b890fefedbf4ac05dfde0b.tar.gz baldeagleos-repo-8e65dc62f3f9f6b8f7b890fefedbf4ac05dfde0b.tar.xz baldeagleos-repo-8e65dc62f3f9f6b8f7b890fefedbf4ac05dfde0b.zip | |
Adding metadata
Diffstat (limited to 'sys-power/tlp')
| -rw-r--r-- | sys-power/tlp/Manifest | 2 | ||||
| -rw-r--r-- | sys-power/tlp/tlp-1.10.1.ebuild | 126 | ||||
| -rw-r--r-- | sys-power/tlp/tlp-1.8.0-r1.ebuild | 50 | ||||
| -rw-r--r-- | sys-power/tlp/tlp-1.9.1-r1.ebuild | 126 |
4 files changed, 253 insertions, 51 deletions
diff --git a/sys-power/tlp/Manifest b/sys-power/tlp/Manifest index 99e73e53b141..60129fc86464 100644 --- a/sys-power/tlp/Manifest +++ b/sys-power/tlp/Manifest @@ -1,2 +1,2 @@ -DIST tlp-1.8.0.tar.gz 172154 BLAKE2B 843951699bab3237e3f3869393fe9890088da950101c13351e175287734871e1a72e368264b775a3f1c128fe8ae3225db1e4b6fac9fb72260a59a02028f48647 SHA512 d1c133faf2c7870b66a363ff84e5e0fafc6be2e36b5440336e3f4c45e68a9a8b7524f697af7a509cf724e21c3a43f976f9814e627531148e9ddaff267564d3c7 +DIST tlp-1.10.1.tar.gz 217945 BLAKE2B 604ab1e5ef99ca944511be47b4999eb1b4efc40e04520632f3a07eb2547cd2a9d7f833211d35641bf1506f3e70d1245616bb59af71d65e4f0f399ac7181cc7fa SHA512 ee3ae1d32fe436c25f8a9a4fe14d049989708faf72318c01f651c7245f6bfd62b86c3f149ca236871bb7a1182728cc859188ddc0a798601db1543e99f709850e DIST tlp-1.9.1.tar.gz 210993 BLAKE2B b6ab4a81852ace750cd6ef49b1fb595b85a9f9cafcf8da3f79dfbc0cbe09af62da9a1777e3b70ac03695a59cd45369ca11c1aa00e3a824a92683b5e652df4633 SHA512 9abb0e3fdfc99de0f3c11ee473064663d9baedb1181d2c13c7dd58362c8bbb269108157600f1f674aeb49cf9776cfdf366352cb59ac649e5093e2b843f88debf diff --git a/sys-power/tlp/tlp-1.10.1.ebuild b/sys-power/tlp/tlp-1.10.1.ebuild new file mode 100644 index 000000000000..57f63952f238 --- /dev/null +++ b/sys-power/tlp/tlp-1.10.1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit udev optfeature python-single-r1 + +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" +REQUIRED_USE="ppd? ( ${PYTHON_REQUIRED_USE} )" + +IUSE=" + +ppd + +rdw +" + +# NOTE(JayF): Upstream dep list in human-readable format: +# https://linrunner.de/tlp/developers/dependencies.html +# NOTE(JayF): Blockers for these are not ideal, however all three +# of these packages implement the same service on dbus +# and have conflicting files as a result. Long-term +# there likely needs to be a better solution. See +# https://bugs.gentoo.org/967823. +RDEPEND=" + dev-lang/perl + net-wireless/iw + sys-apps/hdparm + sys-apps/pciutils + sys-apps/usbutils + virtual/udev + ppd? ( + !sys-apps/tuned[ppd] + !sys-power/power-profiles-daemon + $(python_gen_cond_dep 'dev-python/dbus-python[${PYTHON_USEDEP}]') + $(python_gen_cond_dep 'dev-python/pygobject[${PYTHON_USEDEP}]') + ${PYTHON_DEPS} + ) + rdw? ( net-misc/networkmanager ) +" +DEPEND="${RDEPEND}" +DOCS=( changelog README.rst ) + +src_prepare() { + # Add support for a PREFIX variable in the Makefile + sed -e '/^TLP_[A-Z_]\+ \+?= \//s|/|$(TLP_PREFIX)/|' \ + -i Makefile || die + + default +} + +src_compile() { + # NOTE(JayF): TLP_WITH_ELOGIND/TLP_WITH_SYSTEMD are both only installing + # small init/config files. + EMAKEARGS=( + TLP_PREFIX="${EPREFIX}" + TLP_ULIB="${EPREFIX}$(get_udevdir)" + TLP_NO_INIT=1 + TLP_WITH_ELOGIND=1 + TLP_WITH_SYSTEMD=1 + ) + + emake "${EMAKEARGS[@]}" +} + +src_install() { + local myemakeargs=( + "${EMAKEARGS[@]}" + DESTDIR="${D}" + install-tlp install-man-tlp + ) + + use ppd && myemakeargs+=( + install-pd + install-man-pd + ) + + use rdw && myemakeargs+=( + install-rdw + install-man-rdw + ) + + emake "${myemakeargs[@]}" + + fperms 444 /usr/share/tlp/defaults.conf # manpage says this file should not be edited + newinitd "${FILESDIR}/tlp.init" tlp + newinitd "${FILESDIR}/tlp-pd.init" tlp-pd + keepdir /var/lib/tlp # created by Makefile, probably important + einstalldocs +} + +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 + optfeature "Battery functions for ThinkPads prior to the Sandy Bridge generation (2011)" app-laptop/tp_smapi + + if has_version "sys-apps/tuned"; then + ewarn + ewarn "sys-apps/tuned is installed, but is " + ewarn "documented by upstream sys-power/tlp to be conficting. " + ewarn "For best results, uninstall one of these packages." + ewarn + fi + + if has_version "app-laptop/laptop-mode-tools"; then + ewarn + ewarn "app-laptop/laptop-mode-tools is installed, but is " + ewarn "documented by upstream sys-power/tlp to be conficting. " + ewarn "For best results, uninstall one of these packages." + ewarn + fi +} + +pkg_postrm() { + udev_reload +} diff --git a/sys-power/tlp/tlp-1.8.0-r1.ebuild b/sys-power/tlp/tlp-1.8.0-r1.ebuild deleted file mode 100644 index 4c3ac97819fc..000000000000 --- a/sys-power/tlp/tlp-1.8.0-r1.ebuild +++ /dev/null @@ -1,50 +0,0 @@ -# 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 -} diff --git a/sys-power/tlp/tlp-1.9.1-r1.ebuild b/sys-power/tlp/tlp-1.9.1-r1.ebuild new file mode 100644 index 000000000000..57f63952f238 --- /dev/null +++ b/sys-power/tlp/tlp-1.9.1-r1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit udev optfeature python-single-r1 + +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" +REQUIRED_USE="ppd? ( ${PYTHON_REQUIRED_USE} )" + +IUSE=" + +ppd + +rdw +" + +# NOTE(JayF): Upstream dep list in human-readable format: +# https://linrunner.de/tlp/developers/dependencies.html +# NOTE(JayF): Blockers for these are not ideal, however all three +# of these packages implement the same service on dbus +# and have conflicting files as a result. Long-term +# there likely needs to be a better solution. See +# https://bugs.gentoo.org/967823. +RDEPEND=" + dev-lang/perl + net-wireless/iw + sys-apps/hdparm + sys-apps/pciutils + sys-apps/usbutils + virtual/udev + ppd? ( + !sys-apps/tuned[ppd] + !sys-power/power-profiles-daemon + $(python_gen_cond_dep 'dev-python/dbus-python[${PYTHON_USEDEP}]') + $(python_gen_cond_dep 'dev-python/pygobject[${PYTHON_USEDEP}]') + ${PYTHON_DEPS} + ) + rdw? ( net-misc/networkmanager ) +" +DEPEND="${RDEPEND}" +DOCS=( changelog README.rst ) + +src_prepare() { + # Add support for a PREFIX variable in the Makefile + sed -e '/^TLP_[A-Z_]\+ \+?= \//s|/|$(TLP_PREFIX)/|' \ + -i Makefile || die + + default +} + +src_compile() { + # NOTE(JayF): TLP_WITH_ELOGIND/TLP_WITH_SYSTEMD are both only installing + # small init/config files. + EMAKEARGS=( + TLP_PREFIX="${EPREFIX}" + TLP_ULIB="${EPREFIX}$(get_udevdir)" + TLP_NO_INIT=1 + TLP_WITH_ELOGIND=1 + TLP_WITH_SYSTEMD=1 + ) + + emake "${EMAKEARGS[@]}" +} + +src_install() { + local myemakeargs=( + "${EMAKEARGS[@]}" + DESTDIR="${D}" + install-tlp install-man-tlp + ) + + use ppd && myemakeargs+=( + install-pd + install-man-pd + ) + + use rdw && myemakeargs+=( + install-rdw + install-man-rdw + ) + + emake "${myemakeargs[@]}" + + fperms 444 /usr/share/tlp/defaults.conf # manpage says this file should not be edited + newinitd "${FILESDIR}/tlp.init" tlp + newinitd "${FILESDIR}/tlp-pd.init" tlp-pd + keepdir /var/lib/tlp # created by Makefile, probably important + einstalldocs +} + +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 + optfeature "Battery functions for ThinkPads prior to the Sandy Bridge generation (2011)" app-laptop/tp_smapi + + if has_version "sys-apps/tuned"; then + ewarn + ewarn "sys-apps/tuned is installed, but is " + ewarn "documented by upstream sys-power/tlp to be conficting. " + ewarn "For best results, uninstall one of these packages." + ewarn + fi + + if has_version "app-laptop/laptop-mode-tools"; then + ewarn + ewarn "app-laptop/laptop-mode-tools is installed, but is " + ewarn "documented by upstream sys-power/tlp to be conficting. " + ewarn "For best results, uninstall one of these packages." + ewarn + fi +} + +pkg_postrm() { + udev_reload +} |
