|
root / test / ports / base / tree
tree Plain Text 63 lines 1.4 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/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 <chris.tusa@leafscale.com>"
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