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,makepkgbuilds 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). makepkgrefuses root — the entrypoint builds as abuilderuser in a writable copy of the mounted (ro) input.options=('!buildflags' '!lto' '!strip' '!debug')— critical: Arch'smakepkg.confinjects aggressiveCFLAGS/LDFLAGS/LTO/PIE exactly like Fedora's RPM macros, which break OxCaml's./configureand force a PIE link of its non-PIC asm.!buildflagsstops the export;build()alsounsets them belt-and-braces.pkgver=5.2.0minus31is used verbatim (Arch allows letters inpkgver; no remapping needed, unlike Alpine).sha256sums=('SKIP'): the source is the local, already checksum-verified bundle frommake 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).