Change to pre-built packages in the new stormux repository.
This commit is contained in:
		| @@ -28,158 +28,44 @@ attention() { | ||||
| } | ||||
|  | ||||
| install_xlibre() { | ||||
|     local buildDir="/tmp/xlibre-build-$$" | ||||
|     local success=true | ||||
|      | ||||
|     # Make sure system is up to date | ||||
|     yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -Syu | ||||
|      | ||||
|     # Check if we have internet connectivity | ||||
|     if ! ping -c 1 aur.archlinux.org &>/dev/null; then | ||||
|     if ! ping -c 1 aarch64.stormux.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 availableSpace=$(df /tmp | awk 'NR==2 {print $4}') | ||||
|     if [[ $availableSpace -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 -crs --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 -crs --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 -crs --noconfirm; then | ||||
|         msgbox "Failed to build X11Libre dummy video driver. Installation aborted." | ||||
|         cd / && rm -rf "$buildDir" | ||||
|         return 1 | ||||
|     # Add StormUX repository to pacman.conf if not already present | ||||
|     if ! grep -q "aarch64.stormux.org" /etc/pacman.conf; then | ||||
|         infobox "Adding StormUX repository..." | ||||
|         echo -e "\n[stormux]\nSigLevel = Never\nServer = https://aarch64.stormux.org" | sudo "${sudoFlags[@]}" tee -a /etc/pacman.conf > /dev/null | ||||
|         sudo "${sudoFlags[@]}" pacman -Syy | ||||
|     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 | ||||
|     # Install X11Libre packages from StormUX repository | ||||
|     infobox "Installing X11Libre server and drivers..." | ||||
|     if ! sudo "${sudoFlags[@]}" pacman -S --noconfirm xlibre-server-common-git xlibre-server-devel-git; 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 | ||||
|     if ! sudo "${sudoFlags[@]}" pacman -Sdd --noconfirm xlibre-server-git; 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" | ||||
|     # Install input and video drivers | ||||
|     if ! sudo "${sudoFlags[@]}" pacman -S --noconfirm xf86-input-libinput-xlibre xf86-video-dummy-with-vt xf86-video-fbdev; then | ||||
|         msgbox "Failed to install X11Libre input and video drivers." | ||||
|         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 -crs --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 | ||||
| } | ||||
|   | ||||
| @@ -23,6 +23,7 @@ if ! install_xlibre; then | ||||
| fi | ||||
|  | ||||
| # X11Libre installed successfully, install remaining packages | ||||
| # Note: nodm-dgw is now available from StormUX repository (added by install_xlibre) | ||||
| install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xorg-xinit | ||||
|  | ||||
| # GUI bluetooth manager | ||||
|   | ||||
		Reference in New Issue
	
	Block a user