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

Last change on this file since 24641 was 24641, checked in by jdquinn, 5 years ago

CHG: Reconfiguration of Solid Earth build; updated archives; changed path to libgfortran for all Linux builds; cleanup

  • Property svn:executable set to *
File size: 1.2 KB
RevLine 
[24321]1#!/bin/bash
2set -eu
3
4
5# Dependencies
6# - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
7# - zlib (1.2.5 or later, for netCDF-4 compression)
8# - curl (7.18.0 or later, for DAP remote access client support)
9#
10# For most ISSM installations, only hdf5 will be necessary
11#
12
13# Constants
14#
15VER="4.7.2"
[24454]16CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
[24641]17HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
18ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
[24321]19
20# Environment
21#
[24454]22export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include -I${CURL_ROOT}/include"
23export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib -L${CURL_ROOT}/lib"
[24321]24
25# Download source
26$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
27
28# Unpack source
[24641]29tar -zxvf netcdf-c-${VER}.tar.gz
[24321]30
31# Cleanup
32rm -rf install src
33mkdir install src
34
35# Move source to 'src' directory
[24641]36mv netcdf-c-${VER}/* src/
37rm -rf netcdf-c-${VER}
[24321]38
39# Configure
40cd src
41./configure \
42 --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
43 --disable-doxygen
44
45# Compile and install
46if [ $# -eq 0 ]; then
47 make
48 make install
49else
50 make -j $1
51 make -j $1 install
52fi
Note: See TracBrowser for help on using the repository browser.