sys-power/brillo - 9999 (nadevko)

Search

Install

Install this version:

emerge -a =sys-power/brillo-9999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sys-power/brillo-9999

Or alternatively:

emerge --autounmask-write -a =sys-power/brillo-9999

Package Information

Description:
Control the brightness of backlight and keyboard LED devices
Homepage:
https://gitlab.com/cameronnemo/brillo
License:
GPL-3

Ebuild Details

Version EAPI Keywords Slot
9999 8 0
View Raw Ebuild
# Copyright 2026 Nadeŭka <me+oss@nadevko.cc>
# Distributed under the terms of the GNU General Public License v2
EAPI=8

: ${BRILLO_GROUP:=video}

inherit git-r3 udev

DESCRIPTION='Control the brightness of backlight and keyboard LED devices'
HOMEPAGE=https://gitlab.com/cameronnemo/brillo
EGIT_REPO_URI=https://gitlab.com/cameronnemo/${PN}.git
LICENSE=GPL-3

SLOT=0
IUSE='apparmor man policykit setgid +udev'

BDEPEND='man? ( dev-go/go-md2man )'
RDEPEND="
	policykit? ( sys-auth/polkit )
	udev? ( virtual/udev acct-group/${BRILLO_GROUP} )
"

src_prepare() {
	default
	sed -i 's|override CFLAGS|CFLAGS|g' Makefile ||
		die "failed to patch Makefile"
}

src_compile() {
	mkdir -p build || die
	emake build/brillo $(usev man build/brillo.1)
}

src_install() {
	emake DESTDIR="${D}" UDEVRULESDIR="$(get_udevdir)" \
		GROUP=${BRILLO_GROUP} \
		install.bin$(usev setgid .setgid) \
		$(usev apparmor install.apparmor) \
		$(usev man install.man) \
		$(usev policykit install.polkit) \
		$(usev udev install.udev)

	einstalldocs
	newinitd "${FILESDIR}"/brillo.initd brillo
}

pkg_postinst() {
	use udev && udev_reload

	elog 'To make brightness persistent across reboots with OpenRC, enable the service:'
	elog '  rc-update add brillo boot'
	elog '  rc-service brillo start'
}

pkg_postrm() {
	use udev && udev_reload
}

USE Flags

Manage flags for this package: euse -i <flag> -p sys-power/brillo | euse -E <flag> -p sys-power/brillo | euse -D <flag> -p sys-power/brillo

Global/Standard Flags

man
udev
Default: Enabled (+)

Inherited Eclasses

Dependencies

RDEPEND

	policykit? ( sys-auth/polkit )
	udev? ( virtual/udev acct-group/ )

BDEPEND

man? ( dev-go/go-md2man )