summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2016-09-24 22:48:30 +0300
committerAlon Bar-Lev <alonbl@gentoo.org>2016-09-24 22:48:46 +0300
commit20464d39b4ad91c07e4502e871173fa4f7a8e047 (patch)
tree89c90cd1086b9bd36e096cf8b069c834fb580a9d /app-laptop/laptop-mode-tools
parentdev-perl/Lab-Measurement: Version bump (diff)
downloadgentoo-20464d39b4ad91c07e4502e871173fa4f7a8e047.tar.gz
gentoo-20464d39b4ad91c07e4502e871173fa4f7a8e047.tar.bz2
gentoo-20464d39b4ad91c07e4502e871173fa4f7a8e047.zip
app-laptop/laptop-mode-tools: version bump
Package-Manager: portage-2.2.28
Diffstat (limited to 'app-laptop/laptop-mode-tools')
-rw-r--r--app-laptop/laptop-mode-tools/Manifest1
-rw-r--r--app-laptop/laptop-mode-tools/laptop-mode-tools-1.70.ebuild95
2 files changed, 96 insertions, 0 deletions
diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest
index 4051992dae94..61e7b4cccefa 100644
--- a/app-laptop/laptop-mode-tools/Manifest
+++ b/app-laptop/laptop-mode-tools/Manifest
@@ -1,2 +1,3 @@
DIST laptop-mode-tools_1.66.tar.gz 111175 SHA256 0e8488d6112fa7edfa7e4b1084b16f8c7c6726d935029e4afd7d7034caed5f62 SHA512 8649f70ab63ca0a1e5edf5c4c69062b01dce97b34ef6686a2c044f177aaac59008d4275b237e2c97a2541b6b824c0513d32323c156a43684264ba6d2c5fc8b6c WHIRLPOOL 4fc981f00c4afd74da74e192beb292c5d39e2a3bcc23d77e5daf37c71b75acb4df81c70a68586c0704b47fbe08dce69b1921d0d151777b5451b8d6302bac5b0f
DIST laptop-mode-tools_1.69.2.tar.gz 115082 SHA256 2db1225cc8b6fb214f221362b9fabfffb1cbd25556d00bef3d3a6db9f3b19a59 SHA512 cc1e2ef7c2dd963f542b2e745fc8f3f046199d848a3c2bc44509fb2f08dc5dfa05ce1f9d70b5c678e6c088ed55ce7875eadf4ac806f006806c5bb1b229f980e5 WHIRLPOOL a563fee8497c390060c8820b5b5efa9c58c2222175fb9075f55344888627b2f054ed8aee3e1ecf415f84f19ab4c9f6c21bf20ea4880b8827949f9c05baccf945
+DIST laptop-mode-tools_1.70.tar.gz 116624 SHA256 12cde7dbec8c35201efab96187be75ec84e0a2424494852413f21be1b7bc6a11 SHA512 755e2d94b63bb2a6e5362365f11181374c5fe159b508076f5def91c4df93983fa3e2553bbd94ae0b5bb4690aa7fb0881eafe3f4dcc7c8e77a8b72de23f6a21c5 WHIRLPOOL a70b0e3353877ffedd87ed3f72f1239addd34e8fecfd0e54b98c328a1f4a48a87a2f278fa4afa227452eb5f874bd58912a1ddf8ae2f385636c6bb3a552ce7b3a
diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.70.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.70.ebuild
new file mode 100644
index 000000000000..cfdfd4580573
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.70.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+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 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
+}