cd "${SOURCE_DIRECTORY}" &&
LUA_LIB="$(pkg-config --variable=INSTALL_CMOD lua)" &&
LUADBI_INSTALL="${INSTALL_ROOT}/${LUA_LIB}/DBI" &&
mkdir -p "${LUADBI_INSTALL}" &&
install -m0755 DBI.lua "${LUADBI_INSTALL}/" &&
if [ -e ./dbdpostgresql.so ]; then
  install -m0755 dbdpostgresql.so "${LUADBI_INSTALL}/"
elif [ -e ./dbdsqlite3.so ]; then
  install -m0755 dbdsqlite3.so "${LUADBI_INSTALL}/"
fi
