diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-laptop/tpacpi-bat | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-laptop/tpacpi-bat')
-rw-r--r-- | app-laptop/tpacpi-bat/Manifest | 15 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 | 15 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 | 19 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 | 78 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 | 76 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/metadata.xml | 11 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild | 33 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild | 33 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild | 33 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild | 33 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild | 34 | ||||
-rw-r--r-- | app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild | 34 |
12 files changed, 414 insertions, 0 deletions
diff --git a/app-laptop/tpacpi-bat/Manifest b/app-laptop/tpacpi-bat/Manifest new file mode 100644 index 000000000000..d854e95f84b0 --- /dev/null +++ b/app-laptop/tpacpi-bat/Manifest @@ -0,0 +1,15 @@ +AUX tpacpi-bat.confd.0 587 BLAKE2B 642637e9dfa6473e78cf9426d89132b1ec77cac9e02cf2db6764d4de59f25e5eaf2ec18a2f87d37c90af433a6760b522dc4a0556f3b6f74d9a27a884f278fb53 SHA512 a2131a32123e649cd5958aea67d4c96a9bd35ba19bc2c5eef794be7f7e386085e0eb825517783999d6da7abd025b004e357daa024f39d71ea6f653b4ed934271 +AUX tpacpi-bat.confd.1 668 BLAKE2B 88ebd00838e2ed0febbd1321e2ab13dfc4bea292f3f7f665b045370b960d5c462e1d4c139dfbf1061d1692d7acf79b8b794f3c51d4c3e626c9ca7ef515fc6c78 SHA512 570824184f85e9f4b687e67131165671389b836d94f15edbd4bd14c77b0c6546c2991da25bc0172ccdee03cc8c0ad82c378e982e147334e9cb83334d0382038b +AUX tpacpi-bat.initd.1 1498 BLAKE2B 31af866602be78366e7ff967424929f630e9b28fd7c313b707f36c77b86010781203b95c2cc7977fda41378b34f12c80f150b3126774ec0499d148643c35f850 SHA512 1e06d2f4c4356f97c40752d532ea448db9ca39186028bddbe58125fce0e236ed3abd262621c16152b8c44ff24a160c62a51097a37c02dba191403ec71ee005ac +AUX tpacpi-bat.initd.2 1488 BLAKE2B 43e196ae490ba367edc15b1b9a0ef81cc7f56fec33b7ee8e91251f66705d1c5e38caa65a803e8872344149e384ae0b162c6b30e540c38aeceb12958fa0386b86 SHA512 ccd84bc4cd44ed8a3b2c101501ae220d8add3b189f172e4ba5fe9532ba5a64a188b90054696cc60b7bc1b3d72f636649e4678c020c789933d0b4d25f6ffd386d +DIST tpacpi-bat-1.1.tar.gz 17781 BLAKE2B 73e9cef77f5eb889e653dab05b3f9502795833221d007319abad0017b70dc3c60d1a2e7649f1003e9eb16da94efa185b195e42789b528b5c5b62738abaff9e3a SHA512 7b8838e6db7f98cd5bb674a99dbb880ba6574529de68d97ce704bf225ba416183971aae3c2dd623bc8750767c54a2a52cd0b525bce70640ecf0b307fdba03821 +DIST tpacpi-bat-2.1.tar.gz 17753 BLAKE2B c470cfdb98c2873ca44dad9cb0fc31e6bc97c8832735003b707ee191c65dba3cd9c0422513b4a93aae26692a154675cb94e02d30b721d498610bf21711bcf1e6 SHA512 7ed4974d84c3f1ddc9fd5cd6d7f103a11e2f808a223692749e3ae0ec2e888b62083d577214e27634cd76e9b616a6b8d5cb5474ddb64f73972d08641051c5c6f8 +DIST tpacpi-bat-3.0.tar.gz 18137 BLAKE2B db0db2c06d5bc78eb028cb0db2532e5500cce2370c23ab3bf1e49433b83ed2be7cfffe080e46c3699838ff00025d516dd37e071081f79c7d5d6293f4f49730d4 SHA512 2beab3e5495f028b53d673a4243a2128f4ff85e19e18ac7d53663a1d62e20b271442d6c2c8f19cb41d618ddf7ebb4d9b8390f7f185f77bdca33c69bb19463128 +DIST tpacpi-bat-3.1.tar.gz 18584 BLAKE2B 5f1e890f33be4e0d176bda486d9e4363d56a7a933677eb69bedca9ec42e8af5a0e5494f8447702d33ffecda3d1d4a447a56f7aeb9480a3b855a24bce45028d38 SHA512 cdc9e0c0ded96281678199783b4c48ff85a497c90b244a7ce2276b54d7ae4bfa7eb430214bcdb6fabd7478796507b0fbe7fed4b1ab4bc4cdd7bd5ae25f943a77 +EBUILD tpacpi-bat-1.1-r1.ebuild 796 BLAKE2B 7081b9758755b266fe03371c901ceeb731c6fccfe4e663e45967697d84111b259e77284656ef58e24c7e702b771e383b469749d8c740ad6a979096cc2d60aebb SHA512 25911886dedb8a5ba2820d456245e4bf6647b55280bea2201ea17eadf9450a4169c971bf1aa386be5340b340deb7b0ff20b0d7b50ff7d3dd602b5f53120d3d88 +EBUILD tpacpi-bat-2.1.ebuild 796 BLAKE2B 7081b9758755b266fe03371c901ceeb731c6fccfe4e663e45967697d84111b259e77284656ef58e24c7e702b771e383b469749d8c740ad6a979096cc2d60aebb SHA512 25911886dedb8a5ba2820d456245e4bf6647b55280bea2201ea17eadf9450a4169c971bf1aa386be5340b340deb7b0ff20b0d7b50ff7d3dd602b5f53120d3d88 +EBUILD tpacpi-bat-3.0-r1.ebuild 789 BLAKE2B e29bb0916b2d4f43ecdc97b366c07e48fc54fde2fbace42d01b27c91f8a0e6b7ccbced748477c3c83f0140f0ebe0b172add09c0ec6fac8277e7ba7c8f87751b3 SHA512 21e9be8dd04c70e67b68e82ac9c416e7589c5b074e0cd0b1974592e56ab98f1669b0c59085678a3b45df0d3dd02c68d5d288634a60f7ea9e5300b3d3e0123aa1 +EBUILD tpacpi-bat-3.0.ebuild 796 BLAKE2B 7081b9758755b266fe03371c901ceeb731c6fccfe4e663e45967697d84111b259e77284656ef58e24c7e702b771e383b469749d8c740ad6a979096cc2d60aebb SHA512 25911886dedb8a5ba2820d456245e4bf6647b55280bea2201ea17eadf9450a4169c971bf1aa386be5340b340deb7b0ff20b0d7b50ff7d3dd602b5f53120d3d88 +EBUILD tpacpi-bat-3.1.ebuild 829 BLAKE2B e6a07ad049035d1d1a89a01a7c77c0481bfbd7ae6528ed4b8a83df704cca53b6c4f0b05a95ce917555b7e3c21a56e04d6f002dcc492e9345071fc82d35061b4f SHA512 de3f25f6c612b61db7951eee048a757b107d8f2486f5f5c101a30e33b844d57106f379764bc407c1a65de1ed7362a66a401de74a9eb5e031b455b0a838b5fc75 +EBUILD tpacpi-bat-9999.ebuild 829 BLAKE2B e6a07ad049035d1d1a89a01a7c77c0481bfbd7ae6528ed4b8a83df704cca53b6c4f0b05a95ce917555b7e3c21a56e04d6f002dcc492e9345071fc82d35061b4f SHA512 de3f25f6c612b61db7951eee048a757b107d8f2486f5f5c101a30e33b844d57106f379764bc407c1a65de1ed7362a66a401de74a9eb5e031b455b0a838b5fc75 +MISC metadata.xml 338 BLAKE2B 612018ee773059fbd8492aa11f53aa5c99190b9189b864365d06bc309950c11747fae5c0b4b0e2e2915981a4642523ac439988bcaa8003c1394eb58af5ebdcad SHA512 e6cb10546e9a71a1c5fbcea24b4ca97c5eed95e4553d3cd4bbedbf1180da9533a0e570fa674ccf12574825cb369d6197e51969361945958f4322d6cb91e25714 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 new file mode 100644 index 000000000000..94da0a3eb12a --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 @@ -0,0 +1,15 @@ +# /etc/conf.d/tpacpi-bat: config file for /etc/init.d/tpacpi-bat + +# use '/etc/init.d/tpacpi-bat info' at any time to check the thresholds +# currently used by the driver + +# default thresholds for '/etc/init.d/tpacpi-bat start' +TPACPI_BAT_THRESH_START="30" +TPACPI_BAT_THRESH_STOP="85" +# values to be used for '/etc/init.d/tpacpi-bat low' +TPACPI_BAT_LOW_THRESH_START="${TPACPI_BAT_THRESH_START}" +TPACPI_BAT_LOW_THRESH_STOP="${TPACPI_BAT_THRESH_STOP}" + +# values to be used for '/etc/init.d/tpacpi-bat high' +TPACPI_BAT_HIGH_THRESH_START="95" +TPACPI_BAT_HIGH_THRESH_STOP="99" #see bug #485526 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 new file mode 100644 index 000000000000..f1faf1d7fd47 --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 @@ -0,0 +1,19 @@ +# /etc/conf.d/tpacpi-bat: config file for /etc/init.d/tpacpi-bat + +# use '/etc/init.d/tpacpi-bat info' at any time to check the thresholds +# currently used by the driver + +# list of batteries the script should manage +# for example: BATS="1 2" +BATS="1" + +# default thresholds for '/etc/init.d/tpacpi-bat start' +TPACPI_BAT_THRESH_START="30" +TPACPI_BAT_THRESH_STOP="85" +# values to be used for '/etc/init.d/tpacpi-bat low' +TPACPI_BAT_LOW_THRESH_START="${TPACPI_BAT_THRESH_START}" +TPACPI_BAT_LOW_THRESH_STOP="${TPACPI_BAT_THRESH_STOP}" + +# values to be used for '/etc/init.d/tpacpi-bat high' +TPACPI_BAT_HIGH_THRESH_START="95" +TPACPI_BAT_HIGH_THRESH_STOP="99" #see bug #485526 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 new file mode 100644 index 000000000000..d9f5de7fb3dd --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 @@ -0,0 +1,78 @@ +#!/sbin/openrc-run +# Copyright (C) 2012-2016 Christoph Junghans <junghans@gentoo.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +BATS="1" + +depend() { + after modules +} + +start() { + local state1 + + ebegin "Making sure that module 'acpi_call' is loaded" + modprobe acpi_call + state1=$? + eend ${state1} + + [ "${state1}" -ne "0" ] && return 1 + + ebegin "Starting ${SVCNAME}" + set_all ${TPACPI_BAT_THRESH_START} ${TPACPI_BAT_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${TPACPI_BAT_HIGH_THRESH_START} ${TPACPI_BAT_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${TPACPI_BAT_LOW_THRESH_START} ${TPACPI_BAT_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + /usr/bin/tpacpi-bat -s startThreshold ${bat} ${tstart} + /usr/bin/tpacpi-bat -s stopThreshold ${bat} ${tstop} + eend $? + done +} + +info() { + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(/usr/bin/tpacpi-bat -g startThreshold ${bat}) + tstop=$(/usr/bin/tpacpi-bat -g stopThreshold ${bat}) + einfo "Battery ${bat}: ${tstart} ${tstop}" + done +} diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 new file mode 100644 index 000000000000..7c92b739193d --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 @@ -0,0 +1,76 @@ +#!/sbin/openrc-run +# Copyright (C) 2012-2016 Christoph Junghans <junghans@gentoo.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +depend() { + after modules +} + +start() { + local state1 + + ebegin "Making sure that module 'acpi_call' is loaded" + modprobe acpi_call + state1=$? + eend ${state1} + + [ "${state1}" -ne "0" ] && return 1 + + ebegin "Starting ${SVCNAME}" + set_all ${TPACPI_BAT_THRESH_START} ${TPACPI_BAT_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${TPACPI_BAT_HIGH_THRESH_START} ${TPACPI_BAT_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${TPACPI_BAT_LOW_THRESH_START} ${TPACPI_BAT_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + /usr/bin/tpacpi-bat -s startThreshold ${bat} ${tstart} + /usr/bin/tpacpi-bat -s stopThreshold ${bat} ${tstop} + eend $? + done +} + +info() { + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(/usr/bin/tpacpi-bat -g startThreshold ${bat}) + tstop=$(/usr/bin/tpacpi-bat -g stopThreshold ${bat}) + einfo "Battery ${bat}: ${tstart} ${tstop}" + done +} diff --git a/app-laptop/tpacpi-bat/metadata.xml b/app-laptop/tpacpi-bat/metadata.xml new file mode 100644 index 000000000000..a50d8d26b076 --- /dev/null +++ b/app-laptop/tpacpi-bat/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>junghans@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <upstream> + <remote-id type="github">teleshoes/tpacpi-bat</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild new file mode 100644 index 000000000000..e23197335543 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild new file mode 100644 index 000000000000..e23197335543 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild new file mode 100644 index 000000000000..350f9db837ce --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.2 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.1 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild new file mode 100644 index 000000000000..e23197335543 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild new file mode 100644 index 000000000000..6364a4ee745f --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README.md battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.2 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.1 ${PN} + systemd_newunit examples/systemd_fixed_threshold/tpacpi.service \ + ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild new file mode 100644 index 000000000000..6364a4ee745f --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README.md battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.2 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.1 ${PN} + systemd_newunit examples/systemd_fixed_threshold/tpacpi.service \ + ${PN}.service +} |