def METHOD_NAME(
    build_type,
    package_type,
    version,
    author,
    official,
    additional_pkgs,
    with_binaries,
):
    result = []
    result.append("OUTPUT_DIR=/output")
    cmake_flags = ["$CMAKE_FLAGS"]
    build_target = "clickhouse-bundle"
    cc = "clang-11"
    result.append("DEB_ARCH=amd64")
    cxx = cc.replace("gcc", "g++").replace("clang", "clang++")
    if package_type == "deb":
        # NOTE: This are the env for packages/build script
        result.append("MAKE_DEB=true")
        cmake_flags.append("-DCMAKE_INSTALL_PREFIX=/usr")
        cmake_flags.append("-DCMAKE_INSTALL_SYSCONFDIR=/etc")
        cmake_flags.append("-DCMAKE_INSTALL_LOCALSTATEDIR=/var")
    result.append(f"CC={cc}")
    result.append(f"CXX={cxx}")
    cmake_flags.append(f"-DCMAKE_C_COMPILER={cc}")
    cmake_flags.append(f"-DCMAKE_CXX_COMPILER={cxx}")
    if build_type:
        result.append(f"BUILD_TYPE={build_type.capitalize()}")
    else:
        result.append("BUILD_TYPE=None")
    if additional_pkgs:
        # NOTE: This are the env for packages/build script
        result.append("MAKE_APK=true")
        result.append("MAKE_RPM=true")
        result.append("MAKE_TGZ=true")
    if with_binaries == "programs":
        result.append("BINARY_OUTPUT=programs")
    if version:
        result.append(f"VERSION_STRING='{version}'")
    if author:
        result.append(f"AUTHOR='{author}'")
    if official:
        cmake_flags.append("-DCLICKHOUSE_OFFICIAL_BUILD=1")
    result.append('CMAKE_FLAGS="' + " ".join(cmake_flags) + '"')
    result.append(f"BUILD_TARGET={build_target}")
    return result