feat: --follow for deps and a custom example
--follow now follows the deptree of the definition --follow is incompatible with --all build_system = "custom" example with build.sh
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# build.sh — example custom build script for zeta-makepkg.
|
||||
#
|
||||
# Invoked from the extracted source directory. The tool sets:
|
||||
# $DESTDIR → staging tree root (e.g. /tmp/zeta-makepkg/mytool-.../stage)
|
||||
#
|
||||
# This script must compile/assemble the software and install every output
|
||||
# file under $DESTDIR with standard FHS paths (usr/bin/, usr/lib/, etc.).
|
||||
#
|
||||
# For a real project you would replace the example below with:
|
||||
# - Go: go build -o "$DESTDIR/usr/bin/mytool" .
|
||||
# - Rust: cargo build --release && install -D target/release/mytool "$DESTDIR/usr/bin/mytool"
|
||||
# - Zig: zig build -Doptimize=ReleaseSafe --prefix /usr -Ddestdir="$DESTDIR"
|
||||
# - Shell: install -D mytool.sh "$DESTDIR/usr/bin/mytool"
|
||||
# - Python: install -D mytool.py "$DESTDIR/usr/bin/mytool"
|
||||
# - Anything you can script.
|
||||
|
||||
set -eu
|
||||
|
||||
echo "==> Building mytool (custom)"
|
||||
|
||||
# Standalone Go binary: init module, build, install
|
||||
go mod init mytool
|
||||
go build -o mytool .
|
||||
|
||||
# Install into the staging tree
|
||||
install -Dm755 mytool "$DESTDIR/usr/bin/mytool"
|
||||
|
||||
echo "==> Install complete"
|
||||
Reference in New Issue
Block a user