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

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

CHG: Cleanup

  • Property svn:executable set to *
File size: 1.5 KB
RevLine 
[24321]1#!/bin/bash
2set -eu
3
4
5# Dependencies
[24919]6# - MPI implementation (for parallel I/O support)
[24321]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#
[24919]13# Sources:
14# - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
15#
[24321]16
17# Constants
18#
19VER="4.7.2"
[24454]20CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
[24641]21HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
22ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
[24321]23
24# Environment
25#
[24919]26export CPPFLAGS="-I${CURL_ROOT}/include -I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
27export LDFLAGS="-L${CURL_ROOT}/lib -L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
[24321]28
29# Download source
30$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
31
32# Unpack source
[24641]33tar -zxvf netcdf-c-${VER}.tar.gz
[24321]34
35# Cleanup
36rm -rf install src
37mkdir install src
38
39# Move source to 'src' directory
[24641]40mv netcdf-c-${VER}/* src/
41rm -rf netcdf-c-${VER}
[24321]42
43# Configure
44cd src
45./configure \
[25073]46 --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
47 --disable-static \
[24919]48 --disable-dependency-tracking \
49 --enable-fast-install \
[25073]50 --disable-doxygen \
51 --disable-testsets \
52 --disable-examples
[24321]53
54# Compile and install
55if [ $# -eq 0 ]; then
56 make
57 make install
58else
59 make -j $1
60 make -j $1 install
61fi
Note: See TracBrowser for help on using the repository browser.