mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-11 13:27:46 +01:00
install_arch.sh generates a PKGBUILD into a mktemp dir with no source=() and a
package() that copies from hardcoded absolute paths under /home/kuhy. That only
ever works on one machine, so it cannot be published. This PKGBUILD builds from
the GitHub release tarball instead, and fixes what AUR review would reject:
license=('MIT') with the text actually installed to /usr/share/licenses, real
depends (glibc/bash/hicolor-icon-theme, found by namcap), and the desktop entry
plus icons installed into the package rather than into ~/.local/share after the
fact.
install_arch.sh keeps its working-tree dev loop and is deliberately not wired to
this file. Verified: makepkg -Cf from a clean dir with only packaged Flutter on
PATH, namcap clean, pacman -U, and `todo` serving on port 8730.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aoa1nKWRrAbowz7Hfd3tgL
45 lines
1.6 KiB
Markdown
45 lines
1.6 KiB
Markdown
# AUR packaging
|
|
|
|
`PKGBUILD` here is the source of truth for the `todo-flutter` AUR package. The
|
|
AUR checkout (`~/aur/todo-flutter`) is a copy of this file plus a generated
|
|
`.SRCINFO`.
|
|
|
|
## Why the checksum can go stale
|
|
|
|
`source=` points at the GitHub tarball for tag `v$pkgver`, and `sha256sums`
|
|
is the hash of that tarball. A tarball contains this very file, so the
|
|
checksum for tag vX cannot be committed *before* vX is tagged. The copy here
|
|
is therefore a **template**: after pushing a new tag, run `updpkgsums` in the
|
|
AUR checkout to fill in the real hash, and copy the result back here.
|
|
|
|
## Release flow
|
|
|
|
```bash
|
|
# 1. bump `version:` in pubspec.yaml, commit, push
|
|
# 2. tag and push the SINGLE tag (never `git push --tags`)
|
|
git tag v1.2.3 && git push origin v1.2.3
|
|
|
|
# 3. sync + checksum + build + verify
|
|
cp packaging/aur/PKGBUILD ~/aur/todo-flutter/PKGBUILD
|
|
cd ~/aur/todo-flutter
|
|
# bump pkgver to match the tag, then:
|
|
updpkgsums
|
|
makepkg -Cf
|
|
namcap ./*.pkg.tar.zst
|
|
sudo pacman -U ./todo-flutter-*.pkg.tar.zst
|
|
todo # must print: todo desktop serving on http://localhost:8730
|
|
|
|
# 4. publish
|
|
makepkg --printsrcinfo > .SRCINFO
|
|
git add PKGBUILD .SRCINFO && git commit && git push # branch is `master`
|
|
```
|
|
|
|
## Notes
|
|
|
|
- `install_arch.sh` is deliberately **not** wired to this PKGBUILD. That script
|
|
builds the working tree for local development; this one builds a downloaded
|
|
release tarball. Merging them would destroy the dev loop.
|
|
- `options=('!strip')` is load-bearing — see the comment in the PKGBUILD.
|
|
- Building requires network access (`pub get`, plus a git fetch of the shared
|
|
`crdt_sync` dependency). The tracked `pubspec.lock` pins what gets resolved.
|