Update system76-driver ebuild from khoverlay

This commit is contained in:
Sravan Balaji
2024-09-14 19:26:26 -04:00
parent ca884a780d
commit 11b7567805

View File

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