packaging/#
Per-target packaging, driven by the top-level make source / make pkg.
The bundle tarball (make dist) is the single pristine source for every
target; only the thin per-distro metadata differs.
packaging/
├── targets/ # one tiny KEY=VALUE file per distro
│ ├── ubuntu-24.04.conf # FAMILY OS RELEASE CODENAME BASE_IMAGE DEBREV
│ ├── ubuntu-26.04.conf
│ ├── debian-13.conf
│ ├── fedora-44.conf # FAMILY=rpm
│ └── arch.conf # FAMILY=arch
├── deb/ # Debian/Ubuntu (FAMILY=deb)
│ ├── debian/ # source-package templates (@TOKENS@)
│ ├── mksource.sh # bundle -> .dsc/.orig/.debian/.changes
│ └── pbuilder/ # Dockerfile + pbuilderrc + entrypoint
│ └── ... # binary .deb in a clean chroot
├── rpm/ # Fedora/RPM (FAMILY=rpm)
│ ├── oxcaml-compiler.spec.in
│ ├── mockbuild.sh # bundle -> .src.rpm + binary .rpm (mock)
│ └── mock/ # Dockerfile + entrypoint (clean chroot)
├── arch/ # Arch Linux (FAMILY=arch)
│ ├── PKGBUILD.in
│ ├── pkgbuild.sh # bundle -> .pkg.tar.zst (makepkg)
│ └── makepkg/ # Dockerfile + entrypoint
└── repo/ # `make repo`: signed apt+dnf + Homebrew src
Makefile includes targets/$(TARGET).conf, then routes by FAMILY:
deb → packaging/deb/, rpm → packaging/rpm/, arch →
packaging/arch/. Output always goes to out/<target>/ (source/ for
the deb source package, the dir itself for the binary package). All of
out/ is git-ignored.
make repo then assembles a signed apt (multi-suite) + dnf repo from
those, and publishes the unified bundle tarball + sha256 under
repo/src/ with a Homebrew formula skeleton in repo/INSTALL.md.
Build#
make dist # once: the source tarball
make source TARGET=ubuntu-26.04 # Debian source package (Launchpad)
make pkg TARGET=ubuntu-26.04 # binary .deb via pbuilder (Docker)
make all-pkg # every TARGETS entry
Epoch#
EPOCH (top-level Makefile, default 1) is the one systematic knob for
forcing version ordering. It propagates to every target: deb gets an
EPOCH: prefix on the debian/changelog version, rpm gets a dedicated
Epoch: tag (and matching %changelog EVR). EPOCH=0 (or empty)
omits it on both. Bump it (make pkg EPOCH=2 …) only when a release
must sort above an earlier, badly-versioned one.
Add a target#
- Another Debian/Ubuntu release: drop a
targets/<os>-<rel>.conf(copy an existing one, setCODENAME/BASE_IMAGE/DEBREV). Nothing else changes —make pkg TARGET=<os>-<rel>works, including the right mirror/keyring (Ubuntu vs Debian is handled fromOS). - RPM/Fedora: implemented —
make pkg TARGET=fedora-44. Another RPM distro is just a newtargets/<name>.confwithFAMILY=rpm+ the rightRELEASE/BASE_IMAGE;packaging/rpm/followsRELEASE(mock -r fedora-$RELEASE-$arch) with no code changes. - Arch: implemented —
make pkg TARGET=arch(glibc, builds like deb/rpm). Seepackaging/arch/README.md. - Alpine: intentionally not done — OxCaml is glibc-only (musl unsupported upstream).