Build native Debian/Ubuntu/Brew/etc versions of oxcaml packages
0

Configure Feed

Select the types of activity you want to include in your feed.

README.md

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: debpackaging/deb/, rpmpackaging/rpm/, archpackaging/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, set CODENAME / BASE_IMAGE / DEBREV). Nothing else changes — make pkg TARGET=<os>-<rel> works, including the right mirror/keyring (Ubuntu vs Debian is handled from OS).
  • RPM/Fedora: implemented — make pkg TARGET=fedora-44. Another RPM distro is just a new targets/<name>.conf with FAMILY=rpm + the right RELEASE/BASE_IMAGE; packaging/rpm/ follows RELEASE (mock -r fedora-$RELEASE-$arch) with no code changes.
  • Arch: implemented — make pkg TARGET=arch (glibc, builds like deb/rpm). See packaging/arch/README.md.
  • Alpine: intentionally not done — OxCaml is glibc-only (musl unsupported upstream).