pre_install() {
  ##################################################
  ##
  ## check for kernel support
  ## CONFIG_DRM_AMDGPU_CIK=y for Sea Island
  ## CONFIG_DRM_AMDGPU_SI=Y for Southern Island
  ##
  ##################################################
  if [ "$(zgrep -I 'CONFIG_DRM_AMDGPU_CIK' /proc/config.gz)" != "CONFIG_DRM_AMDGPU_CIK=y" ]
  then
    echo -e ":: CONFIG_DRM_AMDGPU_CIK is missing"
    NOAMDCI=1
  fi

  if [ "$(zgrep -I 'CONFIG_DRM_AMDGPU_SI' /proc/config.gz)" != "CONFIG_DRM_AMDGPU_SI=y" ]
  then
    echo -e ":: CONFIG_DRM_AMDGPU_SI is missing"
    NOAMDSI=1
  fi

  if [ "${NOAMDCI}" = "1" ] || [ "${NOAMDSI}" = "1" ]
  then
    echo -e ":: Kernel $(uname -r) not supported"
    echo -e "   you can check yourself with\n$ zgrep -I 'CONFIG_DRM_AMDGPU'\n"
  fi
}

post_install() {
  printf "\nBe sure to add 'amdgpu' to your MODULES in /etc/mkinitcpio.conf"
  printf "\nYou need to to reboot your system after the installation is complete"
  printf "\nThanks for using my pkg 😊\n\n"
}

post_upgrade() {
  printf "\nYou need to to reboot your system after the installation is complete"
  printf "\nThanks for still using my pkg 😊\n\n"
}

post_remove() {
  printf "\nBe sure to remove 'amdgpu' from your MODULES in /etc/mkinitcpio.conf"
  printf "\nYou need to reboot your system now"
  printf "\n🖐️🖐️ bye bye 😞\n\n"
}
