diff --git a/data/generate_driver_definitions.sh b/data/generate_driver_definitions.sh index 60222f0..a4e97be 100755 --- a/data/generate_driver_definitions.sh +++ b/data/generate_driver_definitions.sh @@ -3,6 +3,9 @@ ### Get traditional ubuntu-driver list DRIVERS="$(ubuntu-drivers list | grep -vi -server)" +### Put mesa driver flaours in the list +DRIVERS="$DRIVERS mesa-hybrid mesa-stable mesa-git" + ### Check if the amdgpu module is loaded ### advanced micro devices graphics cards with "radeon" module only do not support the additional drivers if inxi -G | grep driver | grep amdgpu &> /dev/null diff --git a/data/generate_package_info.sh b/data/generate_package_info.sh index 2f871cc..942a536 100755 --- a/data/generate_package_info.sh +++ b/data/generate_package_info.sh @@ -2,7 +2,12 @@ if [[ $1 == "version" ]] then - echo "Version: $(apt-cache show $2 | grep Version: | cut -d":" -f2 | head -n1)" + if [[ $2 == "pika-rocm-meta" ]] + then + echo "Version: $(apt-cache show rocm-core | grep Version: | cut -d":" -f2 | head -n1)" + else + echo "Version: $(apt-cache show $2 | grep Version: | cut -d":" -f2 | head -n1)" + fi else if [[ $1 == "description" ]] then @@ -22,7 +27,12 @@ else then DEVICE="$(lspci | grep -i -E 'vga|display|3d' | cut -d":" -f3 | grep -i nvidia)" else - DEVICE="$(ubuntu-drivers devices | sed ':a;N;$!ba;s/\nmodel/ /g' | grep vendor | grep -i $2 | sed 's/vendor/Device:/')" + if echo "$2" | grep -i -E 'mesa' &> /dev/null + then + DEVICE="$(lspci | grep -i -E 'vga|display|3d' | cut -d":" -f3)" + else + DEVICE="$(ubuntu-drivers devices | sed ':a;N;$!ba;s/\nmodel/ /g' | grep vendor | grep -i $2 | sed 's/vendor/Device:/')" + fi fi fi fi diff --git a/data/modify-driver.sh b/data/modify-driver.sh index e488a5f..ca442c5 100755 --- a/data/modify-driver.sh +++ b/data/modify-driver.sh @@ -37,12 +37,22 @@ fi if dpkg -s "$1" then - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt remove $pkg -y && sudo apt autoremove -y" + if echo $pkg | grep -i mesa + then + zenity --error --text "the following driver "$1" can not be removed only swapped" + else + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt remove $pkg -y && sudo apt autoremove -y" + fi else if echo $pkg | grep -i nvidia then pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt purge nvidia-driver-* -y && apt install $pkg -y && sudo apt autoremove -y" else - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install $pkg -y && sudo apt autoremove -y" + if echo $pkg | grep -i mesa-hybrid + then + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install mesa-stable -y && apt install mesa-hybrid -y && sudo apt autoremove -y" + else + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install $pkg -y && sudo apt autoremove -y" + fi fi fi diff --git a/debian/changelog b/debian/changelog index 0ece65c..58b91aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -pika-drivers (0.4.2-99pika2.lunar) lunar; urgency=medium +pika-drivers (0.4.3-99pika1.lunar) lunar; urgency=medium * initial release