2 set -e # exit on any error
3 GLOBUS_LOCATION=$_CONDOR_SCRATCH_DIR/globus
4 ZLIB_LOCATION=$_CONDOR_SCRATCH_DIR/zlib
6 X509_CERT_DIR=$GLOBUS_LOCATION/share/certificates
7 export GLOBUS_LOCATION LOGNAME X509_CERT_DIR
9 if test -n "${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}"; then
10 PKG_CONFIG_PATH="${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/lib/pkgconfig"
11 OPENSSL_CFLAGS="-I${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/include"
12 OPENSSL_INCLUDES="-I${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/include"
13 OPENSSL_LDFLAGS="-L${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/lib"
14 OPENSSL_LIBS="-lssl -lcrypto"
15 export PKG_CONFIG_PATH
16 export OPENSSL_CFLAGS OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS
17 elif test -n "${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}"; then
18 PKG_CONFIG_PATH="${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/lib/pkgconfig"
19 OPENSSL_CFLAGS="-I${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/include"
20 OPENSSL_INCLUDES="-I${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/include"
21 OPENSSL_LDFLAGS="-L${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/lib"
22 OPENSSL_LIBS="-lssl -lcrypto"
23 export PKG_CONFIG_PATH
24 export OPENSSL_CFLAGS OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS
25 elif test -n "${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}"; then
26 PKG_CONFIG_PATH="${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/lib/pkgconfig"
27 OPENSSL_CFLAGS="-I${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/include"
28 OPENSSL_INCLUDES="-I${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/include"
29 OPENSSL_LDFLAGS="-L${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/lib"
30 OPENSSL_LIBS="-lssl -lcrypto"
31 export PKG_CONFIG_PATH
32 export OPENSSL_CFLAGS OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS
34 if test -n "${LD_LIBRARY_PATH}" -a -z "${LIBPATH}"; then
35 LIBPATH=$LD_LIBRARY_PATH
38 echo ==================================================
39 echo Environment variables:
41 echo ==================================================
42 echo Directory contents:
44 echo ==================================================
45 if test -d /prereq/zlib-1.2.3; then
46 ZLIB_LOCATION=/prereq/zlib-1.2.3
47 echo zlib found in $ZLIB_LOCATION
49 echo Building zlib-1.2.3...
51 ./configure --prefix=$ZLIB_LOCATION
56 for installer in `ls gt*-all-source-installer.tar.gz *nightly.tar.gz`; do
57 echo ==================================================
58 echo Installing Globus Toolkit \($installer\)...
61 ./configure --prefix=$GLOBUS_LOCATION --with-buildopts="-verbose" \
62 --with-gsiopensshargs="--with-zlib=$ZLIB_LOCATION"
63 make globus_usage gsi-openssh install
64 . $GLOBUS_LOCATION/etc/globus-user-env.sh
66 echo ==================================================
67 echo Environment variables:
69 echo ==================================================
70 GLOBUS_FLAVOR_NAME=`gpt-query -name=gsi_openssh | perl -n -e 'if (/gsi_openssh-(.*)-pgm/){print "$1\n";}'|head -1`
71 export GLOBUS_FLAVOR_NAME
72 echo GPT GLOBUS_FLAVOR_NAME is $GLOBUS_FLAVOR_NAME.
73 if test -f gsi_openssh_bundle-*.tar.gz; then
74 echo ==================================================
75 echo Building GSI-OpenSSH GPT bundle...
77 gpt-build -force -verbose gsi_openssh_bundle-*.tar.gz $GLOBUS_FLAVOR_NAME \
78 GSI_OPENSSH_GPTMACRO="--with-zlib=$ZLIB_LOCATION"
80 if test -d gssapi-openssh/openssh; then
81 echo ==================================================
82 echo Installing autotools...
84 ./install-autotools $GLOBUS_LOCATION
86 echo ==================================================
88 cp -r openssh openssh.build
90 if test -f make_gpt_dist; then
91 echo Building GSI-OpenSSH GPT package from CVS...
92 rm -f gsi_openssh-*.tar.gz
94 gpt-build -force -verbose gsi_openssh-*.tar.gz $GLOBUS_FLAVOR_NAME \
95 GSI_OPENSSH_GPTMACRO="--with-zlib=$ZLIB_LOCATION"
97 echo Building GSI-OpenSSH from CVS trunk...
99 ./configure --prefix=$GLOBUS_LOCATION \
100 --with-globus-flavor=$GLOBUS_FLAVOR_NAME \
101 --with-zlib=$ZLIB_LOCATION \
102 --with-privsep-user=$USER --with-privsep-path=$GLOBUS_LOCATION/var/empty
103 make install-nokeys # nonroot
109 rm -rf gt*-installer $GLOBUS_LOCATION
111 ) 2>&1 # we want stdout & stderr mixed in the output file