Update system76-driver ebuild from khoverlay
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Copyright 2020-2024 Bryan Gardiner <bog@khumba.net>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# Source: https://data.gpo.zugaina.org/khoverlay/sys-apps/system76-driver/
|
||||
|
||||
EAPI=8
|
||||
|
||||
@@ -20,9 +21,10 @@ S="${WORKDIR}/${PN}"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="
|
||||
bluetooth
|
||||
elogind
|
||||
lm-sensors
|
||||
+modules
|
||||
networkmanager
|
||||
@@ -32,7 +34,7 @@ IUSE="
|
||||
"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
suspend-workarounds? ( systemd )
|
||||
suspend-workarounds? ( ^^ ( systemd elogind ) )
|
||||
"
|
||||
|
||||
# We skip the Debian package's hard dependency on system76-wallpapers.
|
||||
@@ -60,7 +62,8 @@ RDEPEND="
|
||||
app-laptop/system76-module
|
||||
)
|
||||
suspend-workarounds? (
|
||||
sys-apps/systemd
|
||||
elogind? ( sys-auth/elogind )
|
||||
systemd? ( sys-apps/systemd )
|
||||
bluetooth? ( sys-apps/util-linux )
|
||||
networkmanager? ( net-misc/networkmanager )
|
||||
)
|
||||
@@ -83,7 +86,6 @@ src_install() {
|
||||
distutils-r1_src_install
|
||||
|
||||
# See system76-driver.git/debian/system76-driver.install.
|
||||
dobin "${S}/system76-driver-pkexec"
|
||||
python_doscript "${S}/system76-daemon"
|
||||
python_doscript "${S}/system76-user-daemon"
|
||||
insinto /usr/share/polkit-1/actions
|
||||
@@ -93,11 +95,17 @@ src_install() {
|
||||
|
||||
if use suspend-workarounds; then
|
||||
local utildir
|
||||
utildir=$(systemd_get_utildir) || die "Couldn't read systemd utildir."
|
||||
if use systemd; then
|
||||
utildir=$(systemd_get_utildir) || die "Couldn't read systemd utildir."
|
||||
elif use elogind; then
|
||||
utildir=$(get_libdir)/elogind || die "Couldn't read system libdir."
|
||||
else
|
||||
die "Unknown configuration for suspend-workarounds."
|
||||
fi
|
||||
exeinto "${utildir}/system-sleep"
|
||||
|
||||
doexe "${S}/system76-atlantic-reload"
|
||||
doexe "${S}/system76-thunderbolt-reload"
|
||||
doexe "${S}/system76-virtual-hub"
|
||||
if use bluetooth; then
|
||||
doexe "${S}/lib/systemd/system-sleep/system76-driver_bluetooth-suspend"
|
||||
fi
|
||||
@@ -112,20 +120,32 @@ src_install() {
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Run system76-driver or system76-driver-cli as root to apply settings for"
|
||||
elog "your specific System76 hardware. system76-driver launches a GTK+ UI where"
|
||||
elog "you can see which actions will be taken. system76-driver-cli runs entirely"
|
||||
elog "from the command line and prints out actions taken, but does not ask for"
|
||||
elog "confirmation."
|
||||
elog ""
|
||||
elog " # system76-driver-cli"
|
||||
elog ""
|
||||
elog "You may want to enable the System76 daemon to enable further hardware"
|
||||
elog "support and fixes. For systemd users:"
|
||||
elog ""
|
||||
elog " # systemctl enable --now system76-driver.service"
|
||||
elog ""
|
||||
elog "An experimental OpenRC runscript is also provided:"
|
||||
elog ""
|
||||
elog " # rc-update add system76-driver default"
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
elog "Run system76-driver or system76-driver-cli as root to apply settings for"
|
||||
elog "your specific System76 hardware. system76-driver launches a GTK+ UI where"
|
||||
elog "you can see which actions will be taken. system76-driver-cli runs entirely"
|
||||
elog "from the command line and prints out actions taken, but does not ask for"
|
||||
elog "confirmation."
|
||||
elog ""
|
||||
elog " # system76-driver-cli"
|
||||
elog ""
|
||||
elog "You may want to run the System76 daemon to enable further hardware support"
|
||||
elog "and fixes:"
|
||||
elog ""
|
||||
elog " # systemctl enable --now system76-driver.service (systemd)"
|
||||
elog " # rc-update add system76-driver default (OpenRC)"
|
||||
elog ""
|
||||
elog "This message is only displayed the first time system76-driver is installed."
|
||||
elif ! use suspend-workarounds && ! use systemd; then
|
||||
local ver
|
||||
for ver in ${REPLACING_VERSIONS}; do
|
||||
if ver_test "${ver}" -lt 20.04.90; then
|
||||
elog "Starting with version 20.04.90, the system76-driver ebuild supports"
|
||||
elog "USE=suspend-workarounds via elogind, not only systemd. If you are an"
|
||||
elog "elogind user, consider enabling the suspend workarounds for better"
|
||||
elog "support of your System76 hardware."
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user