Files
ArchiveBox/pkg/debian/nfpm.yaml
Claude c8f562ee37 Wire up GitHub Actions for deb/brew build, test, and release
- Fix debian.yml: pin nfpm version, add permissions, improve test job
  with user creation, init test, and status check
- Fix homebrew.yml: use PyPI JSON API (macOS-compatible, no grep -oP),
  wait for PyPI availability on release, use generated formula not template,
  add Linux (Linuxbrew) test job alongside macOS
- Add release.yml orchestrator: pip → deb + brew + docker in order
- Add workflow_call triggers to pip.yml and docker.yml
- Fix build_brew.sh: replace grep -oP with Python-based PyPI API,
  add on_linux deps (pkg-config, openssl, libffi)
- Fix setup.sh: use GitHub API to find correct .deb download URL
  (filename includes version number)
- Fix postinstall.sh: create archivebox system user, pin version from
  package, check for systemd before daemon-reload
- Fix preremove.sh: stop service before removal, check for systemd
- Fix install.sh: fallback to latest if pinned version not on PyPI
- Add on_linux deps to brew formula for Linuxbrew support
- Tested: .deb builds, installs, creates user, runs archivebox init

https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn
2026-03-15 02:50:14 +00:00

70 lines
1.6 KiB
YAML

# nFPM configuration for building ArchiveBox .deb packages
# Docs: https://nfpm.goreleaser.com/configuration/
# Usage: nfpm package --config pkg/debian/nfpm.yaml --packager deb --target dist/
name: archivebox
arch: "${ARCH:-amd64}"
platform: linux
version: "${VERSION}"
version_schema: semver
maintainer: "Nick Sweeting <nfpm@archivebox.io>"
description: |
Self-hosted internet archiving solution.
Save pages from the web including HTML, PDF, screenshots, media, and more.
Install with: sudo apt install archivebox && archivebox init --setup
vendor: "ArchiveBox"
homepage: "https://archivebox.io"
license: "MIT"
section: "web"
priority: "optional"
depends:
# python3 >= 3.11 allows .deb to install on more systems;
# pip enforces the actual Python version requirement from pyproject.toml
- python3 (>= 3.11)
- python3-pip
- python3-venv
- nodejs
- npm
- git
- wget
- curl
- ripgrep
recommends:
- yt-dlp
- ffmpeg
- chromium | chromium-browser | google-chrome-stable
contents:
# Wrapper script for /usr/bin/archivebox
- src: pkg/debian/archivebox
dst: /usr/bin/archivebox
file_info:
mode: 0755
# Install helper script
- src: pkg/debian/install.sh
dst: /opt/archivebox/install.sh
file_info:
mode: 0755
# Systemd service file
- src: pkg/debian/archivebox.service
dst: /usr/lib/systemd/system/archivebox.service
file_info:
mode: 0644
# Create data directory
- dst: /var/lib/archivebox
type: dir
file_info:
mode: 0755
scripts:
postinstall: pkg/debian/scripts/postinstall.sh
preremove: pkg/debian/scripts/preremove.sh
deb:
compression: zstd