summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2017-04-05 20:52:08 +0300
committerAlon Bar-Lev <alonbl@gentoo.org>2017-04-05 20:53:02 +0300
commit82073bddb55f43fad1fe39061f193b6fc883f3af (patch)
tree8695410709996c8cc3fc3b4ab49fbfa005d8683b /app-laptop
parentdev-lisp/cl-ppcre: Updates EAPI (diff)
downloadgentoo-82073bddb55f43fad1fe39061f193b6fc883f3af.tar.gz
gentoo-82073bddb55f43fad1fe39061f193b6fc883f3af.tar.bz2
gentoo-82073bddb55f43fad1fe39061f193b6fc883f3af.zip
app-laptop/laptop-mode-tools: version bump
Bug: 614766 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/laptop-mode-tools/Manifest1
-rw-r--r--app-laptop/laptop-mode-tools/laptop-mode-tools-1.71.ebuild94
2 files changed, 95 insertions, 0 deletions
diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest
index 7e1e80da4970..126459c77fbb 100644
--- a/app-laptop/laptop-mode-tools/Manifest
+++ b/app-laptop/laptop-mode-tools/Manifest
@@ -1 +1,2 @@
DIST laptop-mode-tools_1.70.tar.gz 116624 SHA256 12cde7dbec8c35201efab96187be75ec84e0a2424494852413f21be1b7bc6a11 SHA512 755e2d94b63bb2a6e5362365f11181374c5fe159b508076f5def91c4df93983fa3e2553bbd94ae0b5bb4690aa7fb0881eafe3f4dcc7c8e77a8b72de23f6a21c5 WHIRLPOOL a70b0e3353877ffedd87ed3f72f1239addd34e8fecfd0e54b98c328a1f4a48a87a2f278fa4afa227452eb5f874bd58912a1ddf8ae2f385636c6bb3a552ce7b3a
+DIST laptop-mode-tools_1.71.tar.gz 118833 SHA256 3aa122f876ef191e2501f550363724e30d20646637cff0de7147124c867166f9 SHA512 67ef4ed4c80f3a64ab9f0f9003d415f9e8759fd0ee1c7a82837d423a0e7aeb03ab95724afd89ae223f954ae0baec5830c8fa600bd6e2e351aead83a656f9b665 WHIRLPOOL 9c26c546f75f45b46b9b9e34a5ac435f58952e4d70b8db02c86170b4026b00112fb4044e41130dbc4f74326e22b39e0b78eeee2ba935179150441e9b5d41c884
diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.71.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.71.ebuild
new file mode 100644
index 000000000000..f4271bf15a17
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.71.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit 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 bluetooth scsi"
+
+RDEPEND="net-wireless/wireless-tools
+ sys-apps/iproute2
+ sys-apps/ethtool
+ sys-apps/hdparm
+ sys-apps/which
+ acpi? ( sys-power/acpid )
+ apm? ( sys-apps/apmd )
+ bluetooth? ( net-wireless/bluez:= )
+ scsi? ( sys-apps/sdparm )"
+DEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ # This should avoid conflict with pm-powersave wrt #327443 and #396703
+ cat <<-EOF > "${T}"/${PN}
+ HOOK_BLACKLIST="00powersave"
+ EOF
+}
+
+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="$(use acpi && echo force || echo disabled)" \
+ PMU="$(false && echo force || echo disabled)" \
+ APM="$(use apm && echo force || echo disabled)" \
+ SYSTEMD=yes \
+ sh ./install.sh || die
+
+ dodoc Documentation/*.txt README.md
+ newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode
+
+ # See src_prepare()
+ insinto /etc/pm/config.d
+ doins "${T}"/${PN}
+}
+
+pkg_postinst() {
+ if use acpi || use apm; then
+ if use acpi; then
+ daemon_name="acpid"
+ elif use apm; then
+ deamon_name="apmd"
+ fi
+ if [ "$(rc-config list default | grep laptop_mode)" = "" ] || [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then
+ 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:"
+ if [ "$(rc-config list default | grep laptop_mode)" = "" ]; then
+ ewarn "# rc-update add laptop_mode default"
+ fi
+ if [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then
+ ewarn "# rc-update add ${daemon_name} default"
+ fi
+ fi
+ 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
+}