summaryrefslogtreecommitdiff
path: root/sys-power/acpilight
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-power/acpilight
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-power/acpilight')
-rw-r--r--sys-power/acpilight/Manifest7
-rw-r--r--sys-power/acpilight/acpilight-1.0-r1.ebuild46
-rw-r--r--sys-power/acpilight/acpilight-1.0.ebuild39
-rw-r--r--sys-power/acpilight/files/acpilight.confd13
-rw-r--r--sys-power/acpilight/files/acpilight.initd41
-rw-r--r--sys-power/acpilight/metadata.xml11
6 files changed, 157 insertions, 0 deletions
diff --git a/sys-power/acpilight/Manifest b/sys-power/acpilight/Manifest
new file mode 100644
index 000000000000..a72f99b9633e
--- /dev/null
+++ b/sys-power/acpilight/Manifest
@@ -0,0 +1,7 @@
+AUX acpilight.confd 269 SHA256 eb53ad14f9ae86dd8495721d44ddda11eb852b9a54c766f1fde7dc291cd56603 SHA512 28e513dbcaa30cec4d2f876c244766037eb6e94ff660ff2caf9cb955f40c710ea750cac73eb5e3890b42904227ccbd7f6c3e2595c2496e54d3339d6afdd0ffb0 WHIRLPOOL 7fb22f1e8050a466708bb45d3ef351166e363edfd226bcf0b89157f0b5ca1fddfe9d59afe559b18da994f38488ecca21d237a92941afb1bfcf212c672187c368
+AUX acpilight.initd 742 SHA256 194ce20b4b3a1d53dcd62a02dffca098bc4627536c7d3cdecad616a933e3281f SHA512 9fe648ea994eeb9baa294226b55bd6230cb2b28952f651755da622278539fc071527e3aa2425e26687bb8065ef2e372ab93d7090532dbf3208ccac8519f01fca WHIRLPOOL 40401099bcc4b87dd104a6d268351e6f254f197247d66ea1611e87bbcb1dfe625f0182efbc566798a083a018cec8b5145ed32bd50c098d7e5d23671649a738c3
+DIST acpilight-1.0.tar.gz 16452 SHA256 8c717b33632ba60898e68c953ebabb28c2d0b9b2bb44ad9762a39ecce8498f66 SHA512 f7913f7ebf6cbde95a42165d8bfa237be03d90fc097164b971c92721cc76f1260a6a607d85f3ecb05ec482019f0ed7f0827a473608daf39b0d05b37c1d228a8a WHIRLPOOL 56d8e43abf50f23343c692bc094e2e158f41986f887b0bc198612f3d0f58be4b6cb9a560aeb13e676775d316f3ab323997cc895fd9ce5a434ceb8ad96ed6ca2a
+EBUILD acpilight-1.0-r1.ebuild 1381 SHA256 9e08595ff7e2fa5617c0fe10c483480c8e975084eeaa3e7edbe56cef380e0bca SHA512 7b0ce1dbe7cd84303de3ef85329475f802f1911341b27130c3981fdc5dfb943b87fb4686c658c20ef138cd7a70a0b3abcc5a87a3a07e427f9ee368f60d8c9654 WHIRLPOOL e5fc4c02f27218fccff3c07367ed7ff82112b483784aa185bcdd07db4863f7e78467d6b3bafab7620442cf38c0a575146a0ebdee3ae73f0b5b0611b4d1c0a9a9
+EBUILD acpilight-1.0.ebuild 1021 SHA256 e1dbb9fe938306008495cb35f55cefdf241f82f7aa39baf528b7264743efe8d0 SHA512 0a19078799a0342a52edb6aa2d5f30babd37d6a290cc69f91f810c1949fd78bb8564a0a6bb7ea1d24eb919d976b449225f2d76639790126551a816089cedaec1 WHIRLPOOL 623f0ba6be2615ef09605232454a5c367bee9eed76bc8a1e76b1170c1b072dbe044b3304c68ba0d1ca1d2dd034fc156ee92f4ae2a43222fac1cb20f18aeb674c
+MISC ChangeLog 540 SHA256 1f8ce1420b54cebfb9d4b0361139c5899b87a1714c900923567b23dfd9034948 SHA512 b5e11865f0bfbfb4300cb1836a37a509edfa6c39d44bcf26e9c0fd411c087cfdb1d0b256245bbccf6cd965304a056190b5a2f0527528a9474a9eee2cbfa13543 WHIRLPOOL d281bb31f984b394820817fbdbbbf734ccbd3881b5ba2a8e847c4506ed3f2704a3dee6cb40ce0ac07b648c18a7a04813adc61a2dcd9c73c434aef7924a186fa7
+MISC metadata.xml 337 SHA256 3c36f7198ca0d08996a10462a97bb6d7730ddb3853590864a0ccf350d89f0fce SHA512 4f183fd6e3292302ca589c466292f6222e6980a72a11ff7b82fefc293d3d37902b79439f1f044ec44a88dfa5675f769b2f39e44005e57bfa3e1ed132ff451cd4 WHIRLPOOL fbadc483ac408a6f3abc3074990d79ac3bf8f2920b90ae7aa65de90e8fc9108b405f4481f3f88866ff0cfac705703d158b4ef94668002615d437e58c00646587
diff --git a/sys-power/acpilight/acpilight-1.0-r1.ebuild b/sys-power/acpilight/acpilight-1.0-r1.ebuild
new file mode 100644
index 000000000000..8d128ac7d5f6
--- /dev/null
+++ b/sys-power/acpilight/acpilight-1.0-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+
+inherit python-r1 udev
+
+DESCRIPTION="Replacement for xbacklight that uses the ACPI interface to set brightness"
+HOMEPAGE="https://github.com/wavexx/acpilight/"
+SRC_URI="https://github.com/wavexx/acpilight/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/udev
+ ${PYTHON_DEPS}
+ !x11-apps/xbacklight"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+DOCS=( README.rst )
+
+src_install() {
+ python_foreach_impl python_doscript xbacklight
+ udev_dorules "${S}"/90-backlight.rules
+ doman xbacklight.1
+ einstalldocs
+ newinitd "${FILESDIR}"/acpilight.initd acpilight
+ newconfd "${FILESDIR}"/acpilight.confd acpilight
+}
+
+pkg_postinst() {
+ udev_reload
+ einfo
+ elog "To use the xbacklight binary as a regular user, you must be a part of the video group"
+ einfo
+ elog "If this utility does not find any backlights to manipulate,"
+ elog "verify you have kernel support on the device and display driver enabled."
+ einfo
+ elog "To take advantage of the init script, and automate the process of"
+ elog "saving and restoring the brightness level you should add acpilight"
+ elog "to the boot runlevel. You can do this as root like so:"
+ elog "# rc-update add acpilight boot"
+ einfo
+}
diff --git a/sys-power/acpilight/acpilight-1.0.ebuild b/sys-power/acpilight/acpilight-1.0.ebuild
new file mode 100644
index 000000000000..5cad2efcab7f
--- /dev/null
+++ b/sys-power/acpilight/acpilight-1.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+
+inherit python-r1 udev
+
+DESCRIPTION="Replacement for xbacklight that uses the ACPI interface to set brightness"
+HOMEPAGE="https://github.com/wavexx/acpilight/"
+SRC_URI="https://github.com/wavexx/acpilight/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/udev
+ ${PYTHON_DEPS}
+ !x11-apps/xbacklight"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+DOCS=( README.rst )
+
+src_install() {
+ python_foreach_impl python_doscript xbacklight
+ udev_dorules "${S}"/90-backlight.rules
+ doman xbacklight.1
+ einstalldocs
+}
+
+pkg_postinst() {
+ udev_reload
+ einfo
+ elog "To use the xbacklight binary as a regular user, you must be a part of the video group"
+ einfo
+ elog "If this utility does not find any backlights to manipulate,"
+ elog "verify you have kernel support on the device and display driver enabled."
+ einfo
+}
diff --git a/sys-power/acpilight/files/acpilight.confd b/sys-power/acpilight/files/acpilight.confd
new file mode 100644
index 000000000000..ecb74eb7209f
--- /dev/null
+++ b/sys-power/acpilight/files/acpilight.confd
@@ -0,0 +1,13 @@
+# RESTORE_ON_START:
+# Restore brightness level when acpilight starts
+# no - Do not restore state
+# yes - Restore state
+
+RESTORE_ON_START="yes"
+
+# SAVE_ON_STOP:
+# Save brightness level when acpilight stops
+# no - Do not save state
+# yes - Save state
+
+SAVE_ON_STOP="yes"
diff --git a/sys-power/acpilight/files/acpilight.initd b/sys-power/acpilight/files/acpilight.initd
new file mode 100644
index 000000000000..0de6029867e0
--- /dev/null
+++ b/sys-power/acpilight/files/acpilight.initd
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+state_dir=/var/lib/acpilight
+
+extra_commands="save restore"
+
+depend() {
+ need localmount
+ after bootmisc modules isapnp coldplug hotplug
+}
+
+restore() {
+ ebegin "Restoring brightness level"
+ if [ ! -r "${state_dir}/state" ] ; then
+ ewarn "No brightness level in ${state_dir}/state"
+ eend 0
+ return 0
+ fi
+ xbacklight "$(cat "${state_dir}/state")"
+ eend $?
+}
+
+save() {
+ ebegin "Saving brightness level"
+ mkdir -p "${state_dir}" && xbacklight -get > "${state_dir}/state"
+ eend $?
+}
+
+start() {
+ if [ "${RESTORE_ON_START}" = "yes" ]; then
+ restore
+ fi
+}
+
+stop() {
+ if [ "${SAVE_ON_STOP}" = "yes" ]; then
+ save
+ fi
+}
diff --git a/sys-power/acpilight/metadata.xml b/sys-power/acpilight/metadata.xml
new file mode 100644
index 000000000000..f5072a8cbd34
--- /dev/null
+++ b/sys-power/acpilight/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>grknight@gentoo.org</email>
+ <name>Brian Evans</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">wavexx/acpilight</remote-id>
+ </upstream>
+</pkgmetadata>