termux 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. requirements_termux_lib_installed()
  3. {
  4. pkg-query -s "$1" > /dev/null 2>&1 || return $?
  5. }
  6. requirements_termux_libs_install()
  7. {
  8. pkg install "$@" || return $?
  9. }
  10. requirements_termux_libs_remove()
  11. {
  12. pkg --yes remove "$@" || return $?
  13. }
  14. requirements_termux_define_base()
  15. {
  16. requirements_check "$@" \
  17. autoconf automake bison ca-certificates curl libc6-dev libffi-dev libgdbm-dev libncurses5-dev \
  18. libsqlite3-dev libtool libyaml-dev make openssl patch pkg-config sqlite3 zlib1g zlib1g-dev
  19. requirements_${_system_name_lowercase}_define_libgmp
  20. requirements_${_system_name_lowercase}_define_libreadline
  21. }
  22. requirements_termux_define()
  23. {
  24. case "$1" in
  25. (rvm)
  26. requirements_check bash curl patch bzip2 ca-certificates gawk
  27. ;;
  28. (*)
  29. requirements_check clang coreutils curl gawk git gnupg gpgv \
  30. libc++ libclang libclang-dev libllvm libxml2 make ncurses ncurses-ui-libs \
  31. openssl openssl-dev openssl-tool readline sqlite tar zlib zlib-dev
  32. ;;
  33. esac
  34. }