*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sys-power / acpilight / acpilight-1.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_6 )
7
8 inherit python-r1 udev
9
10 MY_P="${PN}-v${PV}"
11
12 DESCRIPTION="Replacement for xbacklight that uses the ACPI interface to set brightness"
13 HOMEPAGE="https://gitlab.com/wavexx/acpilight/"
14 SRC_URI="https://gitlab.com/wavexx/acpilight/-/archive/v${PV}/${MY_P}.tar.gz"
15 LICENSE="GPL-3+"
16 SLOT="0"
17 KEYWORDS="amd64 x86"
18 IUSE=""
19
20 S="${WORKDIR}/${MY_P}"
21
22 RDEPEND="virtual/udev
23         ${PYTHON_DEPS}
24         !x11-apps/xbacklight"
25 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
26 DOCS=( README.rst NEWS.rst )
27
28 # Disable Makefile that installs by default
29 src_compile() { :; }
30
31 src_install() {
32         python_foreach_impl python_doscript xbacklight
33         udev_dorules "${S}"/90-backlight.rules
34         doman xbacklight.1
35         einstalldocs
36         newinitd "${FILESDIR}"/acpilight.initd acpilight
37         newconfd "${FILESDIR}"/acpilight.confd acpilight
38 }
39
40 pkg_postinst() {
41         udev_reload
42         einfo
43         elog "To use the xbacklight binary as a regular user, you must be a part of the video group"
44         einfo
45         elog "If this utility does not find any backlights to manipulate,"
46         elog "verify you have kernel support on the device and display driver enabled."
47         einfo
48         elog "To take advantage of the init script, and automate the process of"
49         elog "saving and restoring the brightness level you should add acpilight"
50         elog "to the boot runlevel. You can do this as root like so:"
51         elog "# rc-update add acpilight boot"
52         einfo
53 }