Files
fastwc/packaging/README.md
T
huntedbytheirs f217551448 packaging: build recipes for arch, gentoo, nix, void, fedora
Five distro recipes in packaging/, all following the same recipe:
unpack the Gitea release archive (which extracts to fastwc/), run
autoreconf -fi (the generated configure/Makefile.in are not committed),
configure, make, make install - the binary needs only glibc.

Each recipe notes the release prerequisite: the archive URL requires a
v0.1.0 tag on the remote, and Arch/Nix/Void carry an integrity
placeholder to fill in once the tag exists. The PKGBUILD was validated
with makepkg --printsrcinfo, and the full build recipe was run
end-to-end from a Gitea-layout tarball (autoreconf, configure, make,
make install DESTDIR) producing a working /usr/bin/fastwc.
2026-08-29 18:20:45 -04:00

50 lines
2.4 KiB
Markdown

# Packaging
Build recipes for the distributions that matter. Each one follows the
same recipe: unpack the release archive, regenerate the autotools
files (`autoreconf -fi` — the generated `configure`/`Makefile.in` are
not committed), `configure`, `make`, `make install`. The binary is a
single static-ish ELF that only needs glibc.
| Distro | File | Tooling |
|--------|------|---------|
| Arch | `arch/PKGBUILD` | `makepkg` |
| Gentoo | `gentoo/app-misc/fastwc/fastwc-0.1.0.ebuild` | `ebuild` / `emerge` (drop into a local repo or `app-portage/eselect-repository`) |
| NixOS | `nix/default.nix` | `nix build -f default.nix` (or a `callPackage` from a nixpkgs overlay) |
| Void | `void/template` | `xbps-src pkg fastwc` (in a `void-packages` checkout: `cp -r ../fastwc/packaging/void srcpkgs/fastwc`) |
| Fedora | `fedora/fastwc.spec` | `rpmbuild -ba fastwc.spec` (or `fedpkg`/`mock`) |
## Before the first build
Each recipe points at the Gitea release archive
`https://git.spectoria.dev/huntedbytheirs/fastwc/archive/v0.1.0.tar.gz`,
which does not exist until a `v0.1.0` tag is pushed:
```sh
git tag -a v0.1.0 -m "fastwc 0.1.0"
git push origin v0.1.0
```
Then fill in the integrity placeholders each distro demands:
- **Arch**: replace `sha256sums=('SKIP')` with the hash `makepkg` reports on the first attempt.
- **NixOS**: `lib.fakeHash` makes the first build fail with the real hash — paste it in.
- **Void**: replace `checksum=SKIP` with the sha256 `xbps-src` wants (it will refuse to build until then).
- **Gentoo / Fedora**: hashes live outside the recipe (the `Manifest` file / source RPM metadata), so nothing to fill in here.
## Notes
- **Gitea archive layout**: these archives extract to a top-level
directory named after the repo (`fastwc/`, no version suffix), which
is why the recipes `cd fastwc`, set `S="${WORKDIR}/fastwc"`, or use
`%autosetup -n fastwc`. If a future host renames the layout, adjust
those three spots.
- **Architecture**: the SIMD kernels dispatch AVX-512/AVX-2/SSE2 at
runtime with a scalar fallback, so the code builds anywhere — the
recipes currently declare `x86_64` because that is what the benchmark
contract is validated on. Loosen if you build elsewhere.
- **`-pthread`** is in `AM_CFLAGS`; glibc >= 2.34 provides pthreads in
libc, so there is no separate runtime dependency.
- The `fastwc` binary installs to `$(bindir)/fastwc` and does not
shadow `wc` — nothing conflicts with coreutils.