Skip to content

packaging: FHS install, deb/rpm (nfpm), Arch PKGBUILD, Void template, MIT license#4

Open
Halicea wants to merge 7 commits into
mainfrom
packaging
Open

packaging: FHS install, deb/rpm (nfpm), Arch PKGBUILD, Void template, MIT license#4
Halicea wants to merge 7 commits into
mainfrom
packaging

Conversation

@Halicea

@Halicea Halicea commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

End-to-end Linux packaging foundation. Everything builds on one new FHS-aware install target; the distro recipes layer on top.

Makefile — FHS install

  • PREFIX / DESTDIR / BINDIR / MANDIR (GNU/FHS convention).
  • install is now a copy-based FHS install: binaries → $(BINDIR), committed man pages → $(MANDIR)/man1, LICENSE$(PREFIX)/share/doc/hed/copyright. No pandoc needed.
  • Old symlink-into-~/.local/bin behaviour preserved as install-dev (nothing depended on the old install; install.sh symlinks itself). uninstall / uninstall-dev mirror them.

License

  • Add MIT LICENSE (© 2026 42dotmk). Shipped by make install and by the packages. GitHub will show the badge once this merges to main.

deb / rpm — nfpm

  • nfpm.yaml builds .deb + .rpm from the binaries + man pages + license. libc is the only hard dep; fzf/ripgrep/git/tmux/ctags are weak deps via per-format overrides.
  • CI builds with MAN_DIR=/usr/share/man, adds a build-packages step (nfpm from goreleaser's apt repo), and attaches *.deb/*.rpm to the Release on tag push.

Arch / Void

  • packaging/arch/PKGBUILD — AUR source build from the tagged release; vendors the tree-sitter submodule from a local clone; installs the license under /usr/share/licenses.
  • packaging/void/template — xbps-src template; pulls tree-sitter as a second distfile (source tarballs omit submodules). Checksums are documented placeholders to fill with xgensum.
  • packaging/README.md documents how each recipe maps onto the install target.

Testing

  • make install PREFIX=/usr DESTDIR=… → correct /usr/bin, /usr/share/man/man1 (36 pages), /usr/share/doc/hed/copyright.
  • Build with MAN_DIR=/usr/share/man bakes the right :man path.
  • bash -n clean on PKGBUILD and the Void template; YAML tab-free; build + tests green.
  • nfpm itself runs in CI (sandbox blocked fetching it locally); all its contents inputs verified present.

Not in this PR (follow-ups)

  • arm64 CI build; hed-bin AUR variant; actually submitting to AUR / void-packages (and filling the Void checksums) — those need the respective distro environments.

Halicea added 3 commits June 21, 2026 15:15
Makefile:
- Add PREFIX/DESTDIR/BINDIR/MANDIR following GNU/FHS conventions.
- Rework 'install' into a copy-based FHS install (binaries to
  $(BINDIR), committed man pages to $(MANDIR)/man1) so distro
  packaging can stage into $(DESTDIR)$(PREFIX). No pandoc needed.
- Preserve the old symlink-into-PATH behaviour as 'install-dev'
  (install.sh does its own symlinking, so nothing depended on the
  old 'install').
- Mirror both with 'uninstall' / 'uninstall-dev'.

Packaging:
- Add nfpm.yaml producing .deb and .rpm from the built binaries +
  man pages; libc is the only hard dep, fzf/ripgrep/git/tmux/ctags
  are weak deps (deb/rpm overrides).
- CI: build with MAN_DIR=/usr/share/man so the baked :man path
  matches the packaged location; add a build-packages step (nfpm
  from goreleaser apt repo) and attach *.deb/*.rpm to the release.
- Add MIT license, Copyright (c) 2026 42dotmk.
- nfpm: set license: MIT and ship LICENSE as
  /usr/share/doc/hed/copyright in the deb/rpm.
- make install: stage LICENSE to $(PREFIX)/share/doc/hed/copyright
  (and remove it in uninstall) so source-built packages carry it too.
- packaging/arch/PKGBUILD: AUR source build from the tagged release,
  vendoring the tree-sitter submodule from a local clone; installs the
  MIT license under /usr/share/licenses.
- packaging/void/template: xbps-src template; pulls tree-sitter as a
  second distfile (source tarball lacks submodules). Checksums left as
  documented placeholders for xgensum.
- packaging/README.md: how each recipe maps onto the FHS install target.
- readme.md: 'make install' is now FHS/system install; the symlink dev
  flow is 'make install-dev'. Add a Packages section pointing at the
  deb/rpm releases and packaging/.
@Halicea Halicea changed the title build: FHS install (PREFIX/DESTDIR) + nfpm deb/rpm packaging packaging: FHS install, deb/rpm (nfpm), Arch PKGBUILD, Void template, MIT license Jun 21, 2026
Halicea added 4 commits June 21, 2026 16:37
With MAN_DIR=/usr/share/man (the packaging build flag), MAN_SRC_DIR
resolved to /usr/share/man too, so 'install' globbed the host's system
man pages instead of the repo's. Decouple MAN_SRC_DIR (?= man, the
in-repo source) from MAN_DIR (the baked lookup path).
- packaging/arch/.SRCINFO: committed AUR metadata; README documents the
  authenticated AUR push.
- .github/workflows/pages-repo.yml + packaging/repo-index.html: publish the
  release deb/rpm to an APT+YUM repo on GitHub Pages (signed when
  GPG_PRIVATE_KEY/GPG_PASSPHRASE secrets are set, unsigned otherwise).
- packaging/README.md: document the hosted repo and the homebrew tap
  (42dotmk/homebrew-hed).
Dedicated RSA-4096 signing key (405E3235...B3C8B4E1) for the apt/rpm
Pages repo. Public key committed for verification; private key and
passphrase are in the GPG_PRIVATE_KEY / GPG_PASSPHRASE repo secrets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant