From 8d5dbd847cbc704a6a06405856e94b461011afe3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 27 Mar 2021 06:06:27 +0000 Subject: gentoo resync : 27.03.2021 --- app-laptop/laptop-mode-tools/Manifest | 2 + .../laptop-mode-tools-1.74.ebuild | 85 ++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 app-laptop/laptop-mode-tools/laptop-mode-tools-1.74.ebuild (limited to 'app-laptop/laptop-mode-tools') diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest index 6a13333aed6e..5af4c2747a76 100644 --- a/app-laptop/laptop-mode-tools/Manifest +++ b/app-laptop/laptop-mode-tools/Manifest @@ -1,5 +1,7 @@ AUX 0001-Fix-case-sensitive-name-for-lmt.py.patch 1515 BLAKE2B b4a3007cc81d31c03100c636bb65de19677cc8fc76f754c738205a6040b6452fdd2f396f9f7291aa392a4b8bc9da019520c69de6aecea15a3e3a05dcf2d49d4f SHA512 fda611cf01de59ae55ff651706e919148cac5ec45c5af39cc9e288ba6f2a66b953fd9beda37ded1ca5f80fed9844d4d77cb8360a99dccd25a945eae641bf5429 AUX laptop_mode.init-1.4 1059 BLAKE2B 24dcf91d75df6cffe13cda1c8b9c85c016dae393f79f14ac0bc37c293e0d40e7e7cb34bc31b1c387c10ee74978d1c030fafad60f4e2428a8fcadf03163d5e48a SHA512 4242cda1df6b55cd0bee66dfb9137b6f63118bc31c5f703ed44c42738f47dc794d7f1ed6dd9ba5696b606c4bf624428e8f21e1683cb698d8dda249833a4c5f68 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 EBUILD laptop-mode-tools-1.72.2-r1.ebuild 2651 BLAKE2B 6029a915aa0984c9c7646291c8d733e1d7bffc46ed20690624eb386d2f4f75c95f2c65be8f0b1821c9d2b0bfec3f347bfbeac57024c04d3464be4f020bbcfe32 SHA512 2a5f2059ff323c87851600d2c8d14565cbb3e5abf3b767a471b4e74c1b024b4c0ce874cd52e90ac4812ac276f66b0717e324b377e057cb1e353992eece6f1e12 +EBUILD laptop-mode-tools-1.74.ebuild 2197 BLAKE2B 4579a866601898ee3e63ccddf38b7ecfe0734f26b649bee6824cdbc810fe53facd07ba4e6c16a898fac69c21cca67c45ef6b83fb054db785c24efb760df1e305 SHA512 7177970cf9577837b587d535b412fe69f831ea05f6033b1d7bc4cafc23bf2ae7eebb8cbc59bf892f4a3fc4a2e20d6f13b10e91146d74eeddd782209d0d78bcc2 MISC metadata.xml 471 BLAKE2B e78c61ebdef3dba3257d29e1d8c05cc392ec9fdf0abda9ff606ce9b76e2b41fd82723f26d5c22bafdbcfb58233e051e9e14c9438299671a57ef63a93aafa9bb3 SHA512 a205fcdb7c635d58b94b1dec541b117534420c38135eaa5567814529c8effb00cbd3c17aa022b69d57adf48b3ab4115d4bc0ef3bdc1a26916ce9fcd05a6f8241 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..c90637e13ddb --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.74.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit optfeature systemd tmpfiles 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" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+acpi apm" + +RDEPEND=" + sys-apps/ethtool + sys-apps/iproute2 + sys-apps/which + || ( + sys-apps/sdparm + sys-apps/hdparm + ) + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) +" + +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 + + newtmpfiles "${S}"/etc/systemd/laptop-mode.conf.tmpfiles laptop-mode.conf + + 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 + + tmpfiles_process laptop-mode.conf + + 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 +} -- cgit v1.2.3