|
| 1 | + |
| 2 | +# Arguments: |
| 3 | +# * PROJECT |
| 4 | +# * ROLE |
| 5 | +# * OS_FAMILY |
| 6 | +# * SYSTEM_SSL |
| 7 | +common_deps() |
| 8 | +{ |
| 9 | + # libgcc is needed to compile other dependencies |
| 10 | + case "$OS_FAMILY" in |
| 11 | + solaris|aix) var_append DEPS "libgcc" ;; |
| 12 | + esac |
| 13 | + |
| 14 | + var_append DEPS "lmdb" |
| 15 | + var_append DEPS "pcre2" |
| 16 | + |
| 17 | + # We use system system SSL on RHEL >= 8 |
| 18 | + if ! [ "$SYSTEM_SSL" = 1 ] |
| 19 | + then |
| 20 | + # FIXME: Why do we need zlib? |
| 21 | + # ANSWER: Openssl uses it optionally, TODO DISABLE |
| 22 | + # TICKET: ENT-13049 |
| 23 | + var_append DEPS "zlib openssl" |
| 24 | + fi |
| 25 | + |
| 26 | + # libsasl needed for solaris |
| 27 | + case "$OS_FAMILY" in |
| 28 | + solaris|hpux) var_append DEPS "sasl2" ;; |
| 29 | + esac |
| 30 | + |
| 31 | + # iconv is needed for libxml2 on some platforms |
| 32 | + case "$OS_FAMILY" in |
| 33 | + aix|solaris) var_append DEPS "libiconv" ;; |
| 34 | + esac |
| 35 | + var_append DEPS "libxml2 libyaml" |
| 36 | + |
| 37 | + # libacl & libattr - not for the exotics (linux only?) |
| 38 | + case "$OS_FAMILY" in |
| 39 | + hpux|aix|solaris|freebsd|mingw) ;; |
| 40 | + *) var_append DEPS "libattr libacl" ;; |
| 41 | + esac |
| 42 | +} |
| 43 | + |
| 44 | +nova_deps() |
| 45 | +{ |
| 46 | + var_append DEPS "openldap" |
| 47 | + var_append DEPS "leech" |
| 48 | +} |
| 49 | + |
| 50 | +agent_deps() |
| 51 | +{ |
| 52 | + var_append DEPS "libcurl" |
| 53 | +} |
| 54 | + |
| 55 | +hub_deps() |
| 56 | +{ |
| 57 | + var_append DEPS "libcurl-hub" |
| 58 | + var_append DEPS "nghttp2" |
| 59 | + var_append DEPS "libexpat" |
| 60 | + var_append DEPS "apr apr-util" |
| 61 | + var_append DEPS "apache" |
| 62 | + var_append DEPS "git" |
| 63 | + var_append DEPS "rsync" |
| 64 | + var_append DEPS "postgresql" |
| 65 | + var_append DEPS "php" |
| 66 | +} |
| 67 | + |
| 68 | +DEPS= |
| 69 | + |
| 70 | +common_deps |
| 71 | + |
| 72 | +case "$PROJECT" in |
| 73 | + nova) |
| 74 | + nova_deps |
| 75 | + ;; |
| 76 | + community) |
| 77 | + # There are non community specific dependencies |
| 78 | + ;; |
| 79 | + *) |
| 80 | + echo "$(basename $0): Error: Unexpected PROJECT '$PROJECT'" |
| 81 | + exit 42 |
| 82 | + ;; |
| 83 | +esac |
| 84 | + |
| 85 | +case "$ROLE" in |
| 86 | + agent) |
| 87 | + agent_deps |
| 88 | + ;; |
| 89 | + hub) |
| 90 | + hub_deps |
| 91 | + ;; |
| 92 | + *) |
| 93 | + echo "$(basename $0): Error: Unexpected ROLE '$ROLE'" |
| 94 | + exit 42 |
| 95 | + ;; |
| 96 | +esac |
0 commit comments