summaryrefslogtreecommitdiff
path: root/sys-power/acpilight/acpilight-1.2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
commitb24bd25253fe093f722ab576d29fdc41d04cb1ee (patch)
tree0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /sys-power/acpilight/acpilight-1.2.ebuild
parent121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff)
gentoo resync : 02.08.2019
Diffstat (limited to 'sys-power/acpilight/acpilight-1.2.ebuild')
-rw-r--r--sys-power/acpilight/acpilight-1.2.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/sys-power/acpilight/acpilight-1.2.ebuild b/sys-power/acpilight/acpilight-1.2.ebuild
new file mode 100644
index 000000000000..6bd7e47a9b63
--- /dev/null
+++ b/sys-power/acpilight/acpilight-1.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
+
+inherit python-r1 udev
+
+MY_P="${PN}-v${PV}"
+
+DESCRIPTION="Replacement for xbacklight that uses the ACPI interface to set brightness"
+HOMEPAGE="https://gitlab.com/wavexx/acpilight/"
+SRC_URI="https://gitlab.com/wavexx/acpilight/-/archive/v${PV}/${MY_P}.tar.gz"
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="virtual/udev
+ acct-group/video
+ ${PYTHON_DEPS}
+ !x11-apps/xbacklight"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+DOCS=( README.rst NEWS.rst )
+
+# Disable Makefile that installs by default
+src_compile() { :; }
+
+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 OpenRC 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
+}