|
root / base / git / build.sh
build.sh Bash 32 lines 944 B
 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
#!/bin/bash
# Build script for git

set -e
cd "$SRCDIR"

# Git uses its own Makefile (not autotools). `uname -s` on Hammerhead is
# 'Hammerhead', which config.mak.uname does not match — so it falls through
# to Linux-like defaults that miss illumos-isms (strings.h declarations,
# NEEDS_SOCKET, NEEDS_NSL, HAVE_ALLOCA_H, etc.). Force uname_S=SunOS to
# activate the existing Solaris block, then override the two assumptions
# Hammerhead doesn't satisfy: /usr/ucb/install and /usr/xpg6/bin.
gmake_common() {
    gmake \
        uname_S=SunOS \
        INSTALL=install \
        SANE_TOOL_PATH=/usr/xpg4/bin \
        prefix=$PREFIX \
        CFLAGS=-O2 \
        NO_TCLTK=1 \
        NO_GETTEXT=1 \
        NO_PERL=1 \
        NO_PYTHON=1 \
        NEEDS_SSL_WITH_CURL=1 \
        NEEDS_CRYPTO_WITH_SSL=1 \
        CURL_LDFLAGS="-lcurl -lssl -lcrypto -lz" \
        "$@"
}

gmake_common -j${JOBS:-1} all
gmake_common DESTDIR="$PKGDIR" install