mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-24 05:56:19 +01:00
Some checks are pending
release-apk / release (APK) (push) Waiting to run
The AUR does not review uploads, but packages that violate the rules "may be
deleted without warning", so these were audited against the submission
guidelines rather than assumed compliant.
- pkgdesc now says what the app actually does, in terms a stranger can judge.
"Usefulness" is the one rule these packages are genuinely exposed to, and
the old wording led with the implementation detail.
- optdepends lists every browser the wrapper actually probes for. It searched
Thorium and Brave but only advertised Chrome and Chromium; all four names
were checked to resolve in the official repos or the AUR.
Verified compliant on the rules that can be checked mechanically: not in an
official repo, name free in the AUR, x86_64 declared, no replaces= (the AUR
reserves it for renames), Maintainer line present, license installed. The
conflicts=('todo') on todo-flutter is justified, not defensive: AUR 'todo'
2.4-1 installs its own /usr/bin/todo, confirmed by reading its PKGBUILD.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aoa1nKWRrAbowz7Hfd3tgL
93 lines
3.7 KiB
Bash
93 lines
3.7 KiB
Bash
# Maintainer: Krzysztof Rudnicki <krzysztofrudnicki0@gmail.com>
|
|
pkgname=todo-flutter
|
|
pkgver=1.0.2
|
|
pkgrel=1
|
|
pkgdesc='Offline-first notes app with optional CRDT sync (Flutter web app in a Chrome window)'
|
|
arch=('x86_64')
|
|
url='https://github.com/kuhyx/todo-app'
|
|
license=('MIT')
|
|
# A Chrome-family browser renders the UI, but none is a hard dependency: the
|
|
# wrapper discovers whichever is installed at run time (Chrome, Chromium,
|
|
# Thorium, Brave) and reports clearly if none is present. The deps below are
|
|
# the ones actually linked/executed: the Dart AOT binary and the bundled
|
|
# libsqlite3.so need glibc, /usr/bin/todo is a bash script, and the icons are
|
|
# installed into the hicolor theme hierarchy.
|
|
depends=('glibc' 'bash' 'hicolor-icon-theme')
|
|
optdepends=('google-chrome: renders the app window'
|
|
'chromium: renders the app window'
|
|
'brave-bin: renders the app window'
|
|
'thorium-browser-bin: renders the app window')
|
|
makedepends=('flutter') # flutter-bin provides `flutter`; either satisfies this
|
|
# The AUR already ships an unrelated package literally named 'todo' (a todo.txt
|
|
# CLI) which also owns /usr/bin/todo, so the two genuinely cannot coexist.
|
|
conflicts=('todo')
|
|
# !strip is LOAD-BEARING: the wrapper is a Dart AOT executable with its snapshot
|
|
# embedded in the ELF. Stripping discards the snapshot and the binary degrades
|
|
# to a bare dartaotruntime that refuses to run ("is not an AOT snapshot").
|
|
# !debug because Flutter/Dart AOT release binaries carry no extractable DWARF.
|
|
options=('!strip' '!debug')
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
|
sha256sums=('SKIP') # placeholder: run updpkgsums in the AUR checkout after tagging
|
|
|
|
_srcdir="todo-app-$pkgver"
|
|
|
|
build() {
|
|
cd "$_srcdir"
|
|
# makepkg builds as an unprivileged user with no writable default pub cache;
|
|
# keep it inside $srcdir so the build is self-contained and leaves no trace.
|
|
export PUB_CACHE="$srcdir/.pub-cache"
|
|
flutter build web --release
|
|
# `dart build cli`, NOT `dart compile exe`: dependencies (sqlite3,
|
|
# objective_c) have native build hooks that `dart compile` refuses to handle.
|
|
dart build cli -o build/cli
|
|
}
|
|
|
|
package() {
|
|
cd "$_srcdir"
|
|
local bundle="build/cli/bundle"
|
|
|
|
# Preserve the bundle's bin/ + lib/ layout: the executable resolves its
|
|
# native libraries from ../lib and the web assets from ../web.
|
|
install -dm755 "$pkgdir/opt/todo"
|
|
cp -r "$bundle/bin" "$pkgdir/opt/todo/bin"
|
|
# lib/ exists only when a dependency ships native code (here: libsqlite3.so).
|
|
if [[ -d "$bundle/lib" ]]; then
|
|
cp -r "$bundle/lib" "$pkgdir/opt/todo/lib"
|
|
fi
|
|
chmod 755 "$pkgdir/opt/todo/bin/todo_desktop"
|
|
|
|
install -dm755 "$pkgdir/opt/todo/web"
|
|
cp -r build/web/. "$pkgdir/opt/todo/web/"
|
|
|
|
install -dm755 "$pkgdir/usr/bin"
|
|
cat > "$pkgdir/usr/bin/todo" <<'WRAPPER'
|
|
#!/bin/bash
|
|
exec /opt/todo/bin/todo_desktop "$@"
|
|
WRAPPER
|
|
chmod 755 "$pkgdir/usr/bin/todo"
|
|
|
|
# Desktop entry written inline. Do NOT call install_desktop_entry.sh: it
|
|
# targets ~/.local/share and its dev fallback points Exec at the repo's run.sh.
|
|
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/todo.desktop" <<'DESKTOP'
|
|
[Desktop Entry]
|
|
Type=Application
|
|
Name=todo
|
|
Comment=Offline-first, CRDT-synced notes
|
|
Exec=/usr/bin/todo
|
|
Icon=todo
|
|
Terminal=false
|
|
Categories=Utility;TextEditor;
|
|
StartupWMClass=todo
|
|
DESKTOP
|
|
|
|
local size
|
|
for size in 16 24 32 48 64 128 256 512; do
|
|
install -Dm644 "desktop/icons/$size/todo.png" \
|
|
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/todo.png"
|
|
done
|
|
# No gtk-update-icon-cache / update-desktop-database here: pacman hooks own
|
|
# that, and namcap flags calling them from package().
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|