Files
zeta-toolchain/toolchain/examples/buildsh-demo/build.sh
T
2026-08-23 16:48:51 -04:00

27 lines
886 B
Bash

#!/bin/sh
# build.sh — example build.sh-style build script for zeta-makepkg.
#
# Invoked from the extracted source directory. The tool sets:
# $DESTDIR → staging tree root (e.g. /tmp/zeta-makepkg/buildsh-tool-.../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 the project's
# own build.sh — e.g. one that runs configure && make && make install with
# DESTDIR set, or any autotools-like shell build sequence.
set -eu
echo "==> Building buildsh-tool (build.sh)"
# Example: install a shell script into the staging tree
mkdir -p "$DESTDIR/usr/bin"
cat > "$DESTDIR/usr/bin/buildsh-tool" <<'EOF'
#!/bin/sh
echo "buildsh-tool 1.0"
EOF
chmod 755 "$DESTDIR/usr/bin/buildsh-tool"
echo "==> Install complete"