github.com/cloudberrydb/gpbackup@v1.0.3-0.20240118031043-5410fd45eed6/ci/scripts/build-ddboost.bash (about)

     1  #!/bin/bash
     2  
     3  set -ex
     4  
     5  # Install gpdb binaries (required because ddboost has a dependency on libpq-fe.h)
     6  mkdir -p /usr/local/greenplum-db-devel
     7  tar -xzf bin_gpdb/*.tar.gz -C /usr/local/greenplum-db-devel
     8  source /usr/local/greenplum-db-devel/greenplum_path.sh
     9  
    10  if [[ -f libyaml-0.1.7/libyaml-0.1.7.tar.gz ]]; then
    11    # unpack libyaml so makefile does not try to curl it
    12    tar xzf libyaml-0.1.7/libyaml-0.1.7.tar.gz -C gpbackup_ddboost_plugin
    13  fi
    14  
    15  # build ddboost plugin
    16  pushd gpbackup_ddboost_plugin
    17    source /opt/gcc_env.sh || true
    18    make build
    19    ddboost_plugin_version=$(git describe --tags | perl -pe 's/(.*)-([0-9]*)-(g[0-9a-f]*)/\1+dev.\2.\3/')
    20  popd
    21  
    22  echo ${ddboost_plugin_version} > ddboost_components/ddboost_plugin_version
    23  cp gpbackup_ddboost_plugin/gpbackup_ddboost_plugin ddboost_components/
    24  cp gpbackup_ddboost_plugin/DDBoostSDK/lib/release/linux/64/libDDBoost.so ddboost_components/