Skip to content

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

Merged
halicea merged 12 commits into
mainfrom
packaging
Aug 11, 2026
Merged

packaging: FHS install, deb/rpm (nfpm), Arch PKGBUILD, Void template, MIT license#4
halicea merged 12 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 and others added 9 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.
task_org_root(path) points :task_agenda and the new :org-files picker
at a fixed org tree instead of the cwd; task_agenda_ignore(glob) adds
gitignore-style exclusions (rg -g '!<glob>') honoured by both. Both
have session-only command variants (:task_org_root,
:task_agenda_ignore with list/clear), and :task_agenda takes an
optional path argument overriding the configured root.

The org-files picker moves in from the user config, generalized from
a hard-coded directory to the configured root.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
:mail-attach-add [path] inserts Attach: pseudo-headers into the
compose buffer — direct with a path (~ expanded, validated), fzf
multi-pick over project files without. Compose buffers get the
mutt/Emacs message-mode chords: C-c C-c sends, C-c C-a attaches
(normal + insert mode).

Also shell-escape the thread id passed to notmuch show when opening
a thread, and use MAIL_MAX for the search limit instead of a
hard-coded 500.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
nfpm.yaml packages ./man/man1/*.1 and the makefile's install target
expects the committed pages, but .gitignore listed /man/ so they
never made it into the repo — the v1.19.0 release build failed at
build-packages because the CI checkout had no man/ directory. Drop
the ignore entry and commit the pandoc-generated pages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@halicea
halicea merged commit 10dfa6e into main Aug 11, 2026
2 checks passed
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