-- hooks-demo.recipe — demonstrates shipping a post-transaction hook. -- -- The custom build script installs a small command and a hook file under -- usr/share/zeta/hooks/. zeta-makepkg scans the stage for *.hook files, -- validates each one (a hook is a pure-data Lua table carrying `trigger` -- and `action`), and merges the found paths into the generated `files` -- whitelist so the hook is committed alongside the declared files. -- -- To try this: -- 1. Unpack the source tarball: tar -xzf hooks-demo-1.0.tar.gz -- 2. Run the script manually: cd hooks-demo-1.0 && DESTDIR=/tmp/stage sh build.sh -- 3. Inspect the staged output: find /tmp/stage -- 4. Build with makepkg: zeta-makepkg hooks-demo.recipe return { name = "hooks-demo", version = "1.0", summary = "Example package shipping a post-transaction hook", url = "hooks-demo-1.0.tar.gz", sha256 = nil, deps = {}, build_system = "custom", build_script = "build.sh", files = { "usr/bin/hooks-demo", "usr/share/zeta/hooks/hooks-demo.hook" }, test = "test -x ${DESTDIR}/usr/bin/hooks-demo", }