post_install() {
  set -e

  export CC=clang
  export CXX=clang++

  cd /opt/staekka
  rm -f Gemfile.lock
  bundle config build.nokogiri --use-system-libraries
  bundle install -j"$(nproc)" --no-cache --deployment --path vendor/bundle

  cp plugins/*.rb /opt/metasploit/plugins/
}

post_upgrade() {
  post_install "$@"
}
