#!/bin/sh # Build script for tree # A directory listing utility set -e echo "Building tree..." # Enter source directory (GitHub archives extract with different name) cd tree-2.1.1 # On illumos, use GNU make MAKE=gmake if [ "$(uname -s)" != "SunOS" ]; then MAKE=make fi # Build with appropriate flags for illumos case "$(uname -s)" in SunOS|illumos) # illumos needs specific flags $MAKE CC=gcc CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600" prefix=/usr ;; *) $MAKE CC=gcc CFLAGS="${CFLAGS}" prefix=/usr ;; esac # Install to DESTDIR echo "Installing to ${DESTDIR}..." mkdir -p "${DESTDIR}/usr/bin" mkdir -p "${DESTDIR}/usr/share/man/man1" install -m 755 tree "${DESTDIR}/usr/bin/tree" install -m 644 doc/tree.1 "${DESTDIR}/usr/share/man/man1/tree.1" echo "Build complete!" # Tree Package - Directory Listing Utility # A simple C program for testing coral with real source [package] name = "tree" version = "2.1.1" release = 1 description = "List directory contents in a tree-like format" url = "http://mama.indstate.edu/users/ice/tree/" license = "GPL-2.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [sources] # Real source from upstream (single-line format for TOML parser compatibility) urls = ["https://github.com/Old-Man-Programmer/tree/archive/refs/tags/2.1.1.tar.gz"] checksums = ["SKIP"] [build] parallel = true jobs = 1