source: issm/trunk-jpl/externalpackages/netcdf/install-4.7-with_tests.sh@ 25846

Last change on this file since 25846 was 25846, checked in by jdquinn, 4 years ago

CHG: Clean up

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2set -eu
3
4
5# Dependencies
6# - MPI implementation (for parallel I/O support)
7# - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
8# - zlib (1.2.5 or later, for netCDF-4 compression)
9# - curl (7.18.0 or later, for DAP remote access client support)
10#
11# For most ISSM installations, only hdf5 will be necessary
12#
13# Sources:
14# - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
15#
16
17# Constants
18#
19VER="4.7.2"
20
21CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
22HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
23ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
24
25# Environment
26#
27export CPPFLAGS="-I${CURL_ROOT}/include -I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
28export LDFLAGS="-L${CURL_ROOT}/lib -L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
29
30# Download source
31$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
32
33# Unpack source
34tar -zxvf netcdf-c-$VER.tar.gz
35
36# Cleanup
37rm -rf install src
38mkdir install src
39
40# Move source to 'src' directory
41mv netcdf-c-$VER/* src/
42rm -rf netcdf-c-$VER
43
44# Configure
45cd src
46./configure \
47 --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
48 --disable-static \
49 --disable-dependency-tracking \
50 --enable-fast-install \
51 --disable-doxygen \
52 --enable-netcdf4 \
53 --disable-filter-testing \
54 --disable-examples \
55 --disable-dap-remote-tests
56
57# Compile, test, and install
58if [ $# -eq 0 ]; then
59 make
60 make check
61 make install
62else
63 make
64 make -j $1 check
65 make -j $1 install
66fi
Note: See TracBrowser for help on using the repository browser.