-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuildenv
74 lines (66 loc) · 2.04 KB
/
buildenv
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
63
64
65
66
67
68
69
70
71
72
73
74
# bump: gpg-version /GPG_VERSION="(.*)"/ https://gnupg.org/ftp/gcrypt/gnupg/|re:/gnupg-([\d.]+).tar.bz2/$1/|semver:*
GPG_VERSION="2.5.2"
export ZOPEN_STABLE_URL="https://gnupg.org/ftp/gcrypt/gnupg/gnupg-${GPG_VERSION}.tar.bz2"
export ZOPEN_CATEGORIES="security"
export ZOPEN_STABLE_DEPS="make bzip2 tar curl perl automake autoconf m4 sed gettext zoslib diffutils libgpgerror npth libgcrypt libksba libassuan texinfo pinentry ncurses ntbtls zlib zip openssl"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_COMP=CLANG
GPG_TTY=$(tty)
export GPG_TTY
export ZOPEN_CHECK_OPTS="-i check"
export ZOPEN_RUNTIME_DEPS="pinentry"
export ZOPEN_EXTRA_CPPFLAGS="-D_POSIX_REALTIME_SIGNALS -I\${ZLIB_HOME}/include"
export ZOPEN_EXTRA_CONFIGURE_OPTS="--with-zlib=\${ZLIB_HOME} --with-npth-prefix=\${NPTH_HOME}"
export ZOPEN_EXTRA_LDFLAGS="-L\${ZLIB_HOME}/lib"
export ZOPEN_EXTRA_LIBS="${ZOPEN_EXTRA_LIBS} -lz"
export _EDC_SIG_DFLT=1
zopen_check_results()
{
dir="$1"
pfx="$2"
chk="$1/$2_check.log"
failures=$(egrep "^FAIL:" $chk | wc -l)
skipped=$(egrep "^SKIP:" $chk | wc -l)
passed=$(egrep "^PASS:" $chk | wc -l)
totalTests=$(($failures+$skipped+$passed))
# Echo the following information to gauge build health
cat <<ZZ
actualFailures:${failures}
totalTests:${totalTests}
expectedFailures:9
ZZ
}
zopen_append_to_env()
{
# echo envars outside of PATH, MANPATH, LIBPATH
cat <<ZZ
export GNUPG_BUILDDIR="\${PWD}"
if [ ! -z "\$ZOPEN_IN_ZOPEN_BUILD" ]; then
export GPG_TTY=$(tty)
fi
ZZ
}
zopen_append_to_setup()
{
# echo commands that will run when installing via setup.sh
echo "GPG_CONF_HOME=\"\$HOME/.gnupg\""
echo "mkdir -p \$GPG_CONF_HOME"
echo "cat > \$HOME/.gnupg/gpg-agent.conf <<EOF
pinentry-program \$ZOPEN_ROOTFS/usr/local/bin/pinentry-tty
log-file \$GPG_CONF_HOME/gpg-agent.log
EOF"
echo "cat > \$HOME/.gnupg/dirmngr.conf <<EOF
standard-resolver
no-use-tor
nameserver 1.1.1.1
EOF"
}
zopen_get_version()
{
echo "${GPG_VERSION}"
}
zopen_append_to_zoslib_env() {
cat <<EOF
ASCII_TERMINFO|set|PROJECT_ROOT/../../ncurses/ncurses/share/terminfo/
EOF
}