Add examples/: one working declaration per config concept #41

Open
claude-bot wants to merge 1 commit from examples into master
Collaborator

The only references for writing a package config were the bootstrap sample (uv only) and SPEC's draft schema, which mixes in keys that don't exist yet. Fragments had no guide at all.

Change

  • examples/: eight real, working declarations based on the configs in use on this box. Each file's header lists the concepts it shows, and each key is explained where it's used:
    • uv: default archive shape, extra_binaries, tier 2, sanity_check
    • scaleway-cli: bare binary, {version}, binary_name, combined SHA256SUMS
    • claude-code: archive_binary_path, env wrapper
    • anythingllm-appimage: github-asset-digest, depends
    • jdk25-graalvm + fragment: tag_regex, * in asset_pattern, repackaging a prebuilt tree
    • ollama + fragment: service, system user, backup, replaces
    • ausweisapp + fragment: source build, makedepends, makepkg PGP check, options=()
    • pkgwatch: Forgejo source
  • examples/README.md:
    • a table from each concept to its example;
    • how to pick a generated shape;
    • the exact header a fragment is appended to, and the rules for fragments (+= on source, which fields to override, --nodeps);
    • a five-step recipe for adding a new package.
  • Test: every_example_loads loads examples/ with the real loader (one package per file, every fragment defines package()), so the examples can't go stale.
  • Pointers: the README install step, the SPEC schema and the first-run sample now point to examples/. CHANGELOG entry added.

Verified

  • cargo fmt --check and cargo clippy --all-targets -D warnings are clean; cargo test passes (205 tests).
  • bash -n passes on all three fragments.
  • README claims checked against the code: archive extensions, the rejected field combinations, and tier ≤3 publishing without review.

🤖 Generated with Claude Code

The only references for writing a package config were the bootstrap sample (uv only) and SPEC's draft schema, which mixes in keys that don't exist yet. Fragments had no guide at all. ## Change - **`examples/`:** eight real, working declarations based on the configs in use on this box. Each file's header lists the concepts it shows, and each key is explained where it's used: - `uv`: default archive shape, `extra_binaries`, tier 2, `sanity_check` - `scaleway-cli`: bare binary, `{version}`, `binary_name`, combined `SHA256SUMS` - `claude-code`: `archive_binary_path`, `env` wrapper - `anythingllm-appimage`: `github-asset-digest`, `depends` - `jdk25-graalvm` + fragment: `tag_regex`, `*` in `asset_pattern`, repackaging a prebuilt tree - `ollama` + fragment: service, system user, `backup`, `replaces` - `ausweisapp` + fragment: source build, `makedepends`, makepkg PGP check, `options=()` - `pkgwatch`: Forgejo source - **`examples/README.md`:** - a table from each concept to its example; - how to pick a generated shape; - the exact header a fragment is appended to, and the rules for fragments (`+=` on `source`, which fields to override, `--nodeps`); - a five-step recipe for adding a new package. - **Test:** `every_example_loads` loads `examples/` with the real loader (one package per file, every fragment defines `package()`), so the examples can't go stale. - **Pointers:** the README install step, the SPEC schema and the first-run sample now point to `examples/`. CHANGELOG entry added. ## Verified - `cargo fmt --check` and `cargo clippy --all-targets -D warnings` are clean; `cargo test` passes (205 tests). - `bash -n` passes on all three fragments. - README claims checked against the code: archive extensions, the rejected field combinations, and tier ≤3 publishing without review. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add examples/: one working declaration per config concept
All checks were successful
CI / ci (pull_request) Successful in 2m22s
CI / audit (pull_request) Successful in 10s
14e7a35c93
Eight real package declarations (with three PKGBUILD fragments) covering every implemented key, plus a README indexing concept -> example, explaining the generated header a fragment is appended to, and how to write a new one. A loader test keeps every example valid. README, SPEC and the first-run sample point to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All checks were successful
CI / ci (pull_request) Successful in 2m22s
Required
Details
CI / audit (pull_request) Successful in 10s
Required
Details
This pull request has changes conflicting with the target branch.
  • CHANGELOG.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin "examples:examples"
git switch "examples"
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/pkgwatch!41
No description provided.