diff options
author | Jan Seeger <jan.seeger@thenybble.de> | 2020-08-11 15:55:46 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-26 16:01:34 +0000 |
commit | 931f78d7f055fcd9655776705946213fde425064 (patch) | |
tree | 68a7d8776bdd83bae9ebd3a7d798635067df4463 /app-laptop | |
parent | app-admin/ulogd: fix WhitespaceFound (diff) | |
download | gentoo-931f78d7f055fcd9655776705946213fde425064.tar.gz gentoo-931f78d7f055fcd9655776705946213fde425064.tar.bz2 gentoo-931f78d7f055fcd9655776705946213fde425064.zip |
app-laptop/laptop-mode-tools-1.74: Bumped ebuild, removed pm-utils.
Bumped the ebuild and removed everything pm-utils related.
Signed-off-by: Jan Seeger <jan.seeger@thenybble.de>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-laptop')
-rw-r--r-- | app-laptop/laptop-mode-tools/Manifest | 1 | ||||
-rw-r--r-- | app-laptop/laptop-mode-tools/laptop-mode-tools-1.74.ebuild | 79 |
2 files changed, 80 insertions, 0 deletions
diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest index c1a42249479b..e7bd1d3e1b35 100644 --- a/app-laptop/laptop-mode-tools/Manifest +++ b/app-laptop/laptop-mode-tools/Manifest @@ -1 +1,2 @@ DIST laptop-mode-tools_1.72.2.tar.gz 121437 BLAKE2B 1fdcdb88183156e4983b4561218164df5dde9fc91e85ab0ec1e6a401d3e5c5e70597a97e16c476949e80a674c34683eac6429e64e76c7921bd28f560e4ffe3cb SHA512 9a3960bad518aa73350b72ce30aeb80f3cbb1bf0fd6a11d5afe396b25c2b73f3b3d2fe7de0741eb94c9e3467c85a99741dc7acfd85339b9eb1daca09d3f8c56a +DIST laptop-mode-tools_1.74.tar.gz 124163 BLAKE2B 5080a646b7e0ddd53709aa445abfdde2ea4a7643bf97f86c6d7ca612b6e46210c825df1c01389125ff2dd79e37d2421b76db28f7415454c77a776c3526a08d12 SHA512 70154c5833c02e2adf50bf03b3d05b98946cb7fc5acb73c05f105e3bc34d62e54e57db98be6877b8ebf2d1b951de73ad5afee9a5f7c85a76055ddc0868d5397d diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.74.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.74.ebuild new file mode 100644 index 000000000000..8eb88dc3d5ec --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.74.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils multilib systemd udev + +MY_P="${PN}_${PV}" + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="https://github.com/rickysarraf/laptop-mode-tools/wiki" +SRC_URI="https://github.com/rickysarraf/${PN}/releases/download/${PV}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+acpi apm" + +RDEPEND="sys-apps/iproute2 + sys-apps/ethtool + sys-apps/which + || ( + sys-apps/sdparm + sys-apps/hdparm + ) + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd )" + +S="${WORKDIR}/${MY_P}" + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + LIB_D="/usr/$(get_libdir)" \ + UDEV_D="$(get_udevdir)" \ + SYSTEMD_UNIT_D="$(systemd_get_systemunitdir)" \ + TMPFILES_D="/usr/lib/tmpfiles.d" \ + ACPI="$(usex acpi force disabled)" \ + PMU="disabled" \ + APM="$(usex apm )" \ + SYSTEMD=yes \ + sh ./install.sh || die + + dodoc Documentation/*.txt README.md + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + rm "${ED}/usr/lib/pm-utils/sleep.d/01laptop-mode" || die "could not remove PM utils config." +} + +pkg_postinst() { + local daemon_name + optfeature "bluetooth support" net-wireless/bluez + if [[ -z "${REPLACING_VERSIONS}" ]]; then + if use acpi || use apm; then + if use acpi; then + daemon_name="acpid" + elif use apm; then + deamon_name="apmd" + fi + ewarn "To enable automatic power state event handling," + ewarn "e.g. enabling laptop_mode after unplugging the battery," + ewarn "both laptop_mode and the ${daemon_name} daemon must be" + ewarn "added to default runlevel." + else + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further" + ewarn "information." + ewarn + fi + fi +} |