Xlibre integration added.
This commit is contained in:
parent
0606966eac
commit
419522c475
@ -26,3 +26,157 @@ if dialog --clear --backtitle "Stormux" --yesno "Would you like to reboot now to
|
|||||||
attention() {
|
attention() {
|
||||||
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t
|
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_xlibre() {
|
||||||
|
local buildDir="/tmp/xlibre-build-$$"
|
||||||
|
local success=true
|
||||||
|
|
||||||
|
# Check if we have internet connectivity
|
||||||
|
if ! ping -c 1 aur.archlinux.org &>/dev/null; then
|
||||||
|
msgbox "No internet connection detected. X11Libre installation requires internet access."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check available disk space (need at least 2GB for building)
|
||||||
|
local available_space=$(df /tmp | awk 'NR==2 {print $4}')
|
||||||
|
if [[ $available_space -lt 2097152 ]]; then
|
||||||
|
msgbox "Insufficient disk space in /tmp. Need at least 2GB free for X11Libre build."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
infobox "Setting up X11Libre build environment..."
|
||||||
|
mkdir -p "$buildDir"
|
||||||
|
cd "$buildDir" || {
|
||||||
|
msgbox "Failed to create build directory. Installation aborted."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download PKGBUILDs with error checking
|
||||||
|
infobox "Downloading X11Libre PKGBUILDs..."
|
||||||
|
if ! yay -G xlibre-server-git; then
|
||||||
|
msgbox "Failed to download xlibre-server-git PKGBUILD from AUR."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! yay -G xf86-input-libinput-xlibre; then
|
||||||
|
msgbox "Failed to download xf86-input-libinput-xlibre PKGBUILD from AUR."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! yay -G xf86-video-dummy-with-vt; then
|
||||||
|
msgbox "Failed to download xf86-video-dummy-with-vt PKGBUILD from AUR."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build X11Libre server first
|
||||||
|
infobox "Building X11Libre server (this may take 10-15 minutes)..."
|
||||||
|
cd "$buildDir/xlibre-server-git"
|
||||||
|
if ! makepkg --noconfirm; then
|
||||||
|
msgbox "Failed to build X11Libre server. Installation aborted."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Modify and build input driver
|
||||||
|
infobox "Building X11Libre input driver..."
|
||||||
|
cd "$buildDir/xf86-input-libinput-xlibre"
|
||||||
|
|
||||||
|
# Update PKGBUILD for correct dependencies
|
||||||
|
sed -i "s/makedepends=.*/makedepends=('xlibre-server-devel' 'X-ABI-XINPUT_VERSION=26.0')/" PKGBUILD
|
||||||
|
sed -i "s/conflicts=.*/conflicts=('xf86-input-libinput' 'xorg-server<1.19.0' 'X-ABI-XINPUT_VERSION<26' 'X-ABI-XINPUT_VERSION>=27')/" PKGBUILD
|
||||||
|
|
||||||
|
if ! makepkg --noconfirm; then
|
||||||
|
msgbox "Failed to build X11Libre input driver. Installation aborted."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Modify and build dummy video driver
|
||||||
|
infobox "Building X11Libre dummy video driver..."
|
||||||
|
cd "$buildDir/xf86-video-dummy-with-vt"
|
||||||
|
|
||||||
|
# Update PKGBUILD for X11Libre compatibility
|
||||||
|
sed -i "s/makedepends=.*/makedepends=('xlibre-server-devel-git' 'X-ABI-VIDEODRV_VERSION=28.0' 'xorgproto')/" PKGBUILD
|
||||||
|
sed -i "s/conflicts=.*/conflicts=('xorg-server<21.1.1' 'X-ABI-VIDEODRV_VERSION<28' 'X-ABI-VIDEODRV_VERSION>=29')/" PKGBUILD
|
||||||
|
sed -i 's/{,\.sig}//' PKGBUILD
|
||||||
|
sed -i "/'SKIP'/d" PKGBUILD
|
||||||
|
sed -i '/validpgpkeys=/s/^/#/' PKGBUILD
|
||||||
|
|
||||||
|
if ! makepkg --noconfirm; then
|
||||||
|
msgbox "Failed to build X11Libre dummy video driver. Installation aborted."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove conflicting packages
|
||||||
|
infobox "Removing conflicting Xorg packages..."
|
||||||
|
sudo "${sudoFlags[@]}" pacman -R --noconfirm xorg-server xf86-input-libinput xf86-video-fbdev 2>/dev/null || true
|
||||||
|
|
||||||
|
# Install X11Libre core
|
||||||
|
infobox "Installing X11Libre server..."
|
||||||
|
cd "$buildDir/xlibre-server-git"
|
||||||
|
if ! sudo "${sudoFlags[@]}" pacman -U --noconfirm xlibre-server-common-git-*.pkg.tar.* xlibre-server-devel-git-*.pkg.tar.*; then
|
||||||
|
msgbox "Failed to install X11Libre server components."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! sudo "${sudoFlags[@]}" pacman -Udd --noconfirm xlibre-server-git-*.pkg.tar.*; then
|
||||||
|
msgbox "Failed to install X11Libre server main package."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install input driver
|
||||||
|
infobox "Installing X11Libre input driver..."
|
||||||
|
cd "$buildDir/xf86-input-libinput-xlibre"
|
||||||
|
if ! sudo "${sudoFlags[@]}" pacman -U --noconfirm *.pkg.tar.*; then
|
||||||
|
msgbox "Failed to install X11Libre input driver."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install dummy video driver
|
||||||
|
infobox "Installing X11Libre dummy video driver..."
|
||||||
|
cd "$buildDir/xf86-video-dummy-with-vt"
|
||||||
|
if ! sudo "${sudoFlags[@]}" pacman -U --noconfirm *.pkg.tar.*; then
|
||||||
|
msgbox "Failed to install X11Libre dummy video driver."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build and install fbdev driver
|
||||||
|
infobox "Building and installing fbdev driver for X11Libre..."
|
||||||
|
cd "$buildDir"
|
||||||
|
if ! yay -G xf86-video-fbdev; then
|
||||||
|
msgbox "Failed to download fbdev driver PKGBUILD."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$buildDir/xf86-video-fbdev"
|
||||||
|
sed -i "s/makedepends=.*/makedepends=('xlibre-server-devel-git' 'X-ABI-VIDEODRV_VERSION=28.0')/" PKGBUILD
|
||||||
|
sed -i "s/conflicts=.*/conflicts=('xorg-server<21.1.1' 'X-ABI-VIDEODRV_VERSION<28' 'X-ABI-VIDEODRV_VERSION>=29')/" PKGBUILD
|
||||||
|
|
||||||
|
if ! makepkg --noconfirm; then
|
||||||
|
msgbox "Failed to build fbdev driver for X11Libre."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! sudo "${sudoFlags[@]}" pacman -U --noconfirm *.pkg.tar.*; then
|
||||||
|
msgbox "Failed to install fbdev driver for X11Libre."
|
||||||
|
cd / && rm -rf "$buildDir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
cd /
|
||||||
|
rm -rf "$buildDir"
|
||||||
|
|
||||||
|
infobox "X11Libre installation completed successfully!"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
@ -15,17 +15,24 @@ case "${1}" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
./.includes/toggle-screen.sh -n
|
./.includes/toggle-screen.sh -n
|
||||||
|
|
||||||
|
# Install X11Libre instead of Xorg
|
||||||
|
if ! install_xlibre; then
|
||||||
|
msgbox "X11Libre installation failed. Falling back to standard Xorg installation."
|
||||||
install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xorg-drivers xorg-server xorg-xinit
|
install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xorg-drivers xorg-server xorg-xinit
|
||||||
|
# replace xf86-video-dummy with xf86-video-dummy-with-vt for Xorg fallback
|
||||||
|
yay --noconfirm -Rdd xf86-video-dummy 2>/dev/null || true
|
||||||
|
url_install 'https://stormux.org/packages/xf86-video-dummy-with-vt-0.4.1-1-aarch64.pkg.tar.xz'
|
||||||
|
else
|
||||||
|
# X11Libre installed successfully, install remaining packages
|
||||||
|
install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xorg-xinit
|
||||||
|
fi
|
||||||
|
|
||||||
# GUI bluetooth manager
|
# GUI bluetooth manager
|
||||||
if [[ "${architecture}" == "aarch64" ]]; then
|
if [[ "${architecture}" == "aarch64" ]]; then
|
||||||
install_package blueman
|
install_package blueman
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# replace xf86-video-dummy with xf86-video-dummy-with-vt
|
|
||||||
yay --noconfirm -Rdd xf86-video-dummy
|
|
||||||
url_install 'https://stormux.org/packages/xf86-video-dummy-with-vt-0.4.1-1-aarch64.pkg.tar.xz'
|
|
||||||
|
|
||||||
# Configure nodm
|
# Configure nodm
|
||||||
sudo sed -i "s/{user}/$USER/g" /etc/nodm.conf
|
sudo sed -i "s/{user}/$USER/g" /etc/nodm.conf
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user