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/arch/ — Arch Linux#

Builds the Arch binary package (*.pkg.tar.zst) from the bundle tarball with makepkg in an archlinux container, per https://wiki.archlinux.org/title/Creating_packages. Arch is glibc, so (unlike Alpine/musl) OxCaml builds normally here — same contract as the deb/rpm sides.

packaging/arch/
├── PKGBUILD.in     # recipe template (@TOKENS@); build()/package() drive
│                   #   the bundle's own make / make install
├── pkgbuild.sh     # host orchestrator (renders PKGBUILD, runs Docker)
└── makepkg/
    ├── Dockerfile  # archlinux:latest + base-devel + build deps
    └── build-pkg.sh# entrypoint: makepkg as a non-root user

Use#

make pkg TARGET=arch          # -> out/arch/oxcaml-compiler-5.2.0minus31-1-x86_64.pkg.tar.zst

Install on Arch: sudo pacman -U oxcaml-compiler-*.pkg.tar.zst.

Notes#

  • No --privileged/chroot. Unlike pbuilder/mock, makepkg builds in place, so the container runs plain (build deps are baked into the image; the bundle is self-contained, so the build is offline). Only the image build needs network (pacman).
  • makepkg refuses root — the entrypoint builds as a builder user in a writable copy of the mounted (ro) input.
  • options=('!buildflags' '!lto' '!strip' '!debug') — critical: Arch's makepkg.conf injects aggressive CFLAGS/LDFLAGS/LTO/PIE exactly like Fedora's RPM macros, which break OxCaml's ./configure and force a PIE link of its non-PIC asm. !buildflags stops the export; build() also unsets them belt-and-braces.
  • pkgver=5.2.0minus31 is used verbatim (Arch allows letters in pkgver; no remapping needed, unlike Alpine).
  • sha256sums=('SKIP'): the source is the local, already checksum-verified bundle from make dist.

Repo#

make repo includes an Arch arm (mirroring the apt/dnf ones): it copies out/arch/*.pkg.tar.zst into repo/arch/x86_64/, host-signs each package + the repo-add-built oxcaml.db.tar.zst with your gpg key (detached binary .sig, the pacman convention), exports oxcaml.asc, and writes the [oxcaml] pacman.conf + pacman-key snippet into repo/INSTALL.md. repo-add runs in packaging/repo/arch/ (archlinux image); signing is on the host (key never enters a container).