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

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

CHG: Updated solid earth config to work with PETSc 3.7.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
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"
16HDF5_ROOT="${ISSM_DIR}/externalpackages/hdf5/install"
17ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
18
19# Environment
20#
21export CPPFLAGS="-I${ZLIB_ROOT}/include -I${HDF5_ROOT}/include"
22export LDFLAGS="-L${ZLIB_ROOT}/lib -L${HDF5_ROOT}/lib"
23
24# Download source
25$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
26
27# Unpack source
28tar -zxvf netcdf-c-$VER.tar.gz
29
30# Cleanup
31rm -rf install src
32mkdir install src
33
34# Move source to 'src' directory
35mv netcdf-c-$VER/* src/
36rm -rf netcdf-c-$VER
37
38# Configure
39cd src
40./configure \
41 --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
42 --disable-doxygen
43
44# Compile and install
45if [ $# -eq 0 ]; then
46 make
47 make install
48else
49 make -j $1
50 make -j $1 install
51fi
52
53# Return to initial directory
54cd ..
Note: See TracBrowser for help on using the repository browser.