rosadesktop 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/usr/bin/env bash
  2. requirements_openmandriva_lib_installed()
  3. {
  4. rpm -q --whatprovides "$1" >/dev/null || return $?
  5. }
  6. requirements_openmandriva_lib_available()
  7. {
  8. urpmq "$1" >/dev/null 2>&1 || return $?
  9. }
  10. requirements_openmandriva_version_list()
  11. {
  12. rpm -q --whatprovides "$1" | sed -e "s#^$1-##"
  13. }
  14. requirements_openmandriva_libs_install()
  15. {
  16. __rvm_try_sudo urpmi --downloader wget --wget-options --auth-no-challenge --auto "$@" || return $?
  17. }
  18. requirements_openmandriva_update_system()
  19. {
  20. __rvm_try_sudo urpmi.update -a ||
  21. {
  22. \typeset __ret=$?
  23. case ${__ret} in
  24. (100)
  25. rvm_error "There has been error while updating 'urpmi.update', please give it some time and try again later.
  26. 404 errors should be fixed for rvm to proceed. Check your sources configured in:
  27. /etc/urpmi/urpmi.cfg
  28. "
  29. ;;
  30. esac
  31. return ${__ret}
  32. }
  33. }
  34. requirements_openmandriva_define()
  35. {
  36. case "$1" in
  37. (rvm)
  38. requirements_check bash curl patch
  39. ;;
  40. (jruby*)
  41. requirements_check make
  42. true # not that easy
  43. ;;
  44. (ir*)
  45. true # not that easy
  46. ;;
  47. (opal)
  48. true # not that easy
  49. ;;
  50. (*-head)
  51. requirements_check git
  52. requirements_openmandriva_define "${1%-head}"
  53. ;;
  54. (*)
  55. if [[ ${#rvm_patch_names[@]} -gt 0 || "$1" == *"-head" ]]
  56. then requirements_version_minimal autoconf 2.67
  57. else requirements_check autoconf
  58. fi
  59. if [[ "${_system_arch}" == "x86_64" || "${_system_arch}" == "aarch64" ]]
  60. then requirements_check lib64yaml-devel lib64ffi-devel
  61. else requirements_check libyaml-devel libffi-devel
  62. fi
  63. requirements_check autoconf gcc-c++ glibc-devel patch readline sqlite3-devel \
  64. readline-devel zlib zlib-devel openssl-devel make bzip2 automake libtool bison
  65. ;;
  66. esac
  67. }
  68. requirements_rosadesktop_before()
  69. {
  70. __lib_type=openmandriva
  71. }