# Custom MongoDB Package Builder

## Overview

This project builds a custom MongoDB 8.0.4 server `.deb` package for Ubuntu distributions (Focal and Jammy). It uses the `mongod` binary from the `axcient/mongo-avx` repository and applies specific metadata and configuration adjustments to create a distributable package.

The resulting package is compatible with older CPUs that do not support AVX or AVX2 instructions.

---

## Source

The mongod source code, `mongod` binary and its patches are sourced from the following repositories:
- **Axcient Mongo-AVX Repository**: [https://github.com/Axcient/mongo-avx](https://github.com/Axcient/mongo-avx)
- **Official MongoDB Repository**: https://github.com/mongodb/mongo. The source code is licensed under the Server Side Public License (SSPL) v1.
---

## Metadata Files

The following metadata files are included in the package:

- **`DEBIAN/control`**: Defines package metadata such as name, version, dependencies, and description.
- **`DEBIAN/copyright`**: Contains copyright and licensing information.
- **`usr/share/doc/mongodb-org-server/LICENSE-Community.txt`**: The license file for the MongoDB Community Edition.
- **`usr/share/doc/mongodb-org-server/README`**: A README file with additional information about the package.

---

## Dockerfiles

The project includes Dockerfiles to automate the build process:

- **`Dockerfile-focal`**: Builds the package for Ubuntu 20.04 (Focal).
- **`Dockerfile-jammy`**: Builds the package for Ubuntu 22.04 (Jammy).

---

## Build Instructions

To build the Docker image and generate the `.deb` package, use the following command:

```sh
./build.sh "<REVISION>" <DISTRIBUTION>
