|
Last change
on this file since 25860 was 25860, checked in by jdquinn, 5 years ago |
|
CHG: Simplification of installation script customization needs: should be able to simply set PREFIX in most cases
|
-
Property svn:executable
set to
*
|
|
File size:
1.3 KB
|
| Rev | Line | |
|---|
| [24321] | 1 | #!/bin/bash
|
|---|
| 2 | set -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 | #
|
|---|
| [24919] | 11 | # Sources:
|
|---|
| 12 | # - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
|
|---|
| 13 | #
|
|---|
| [24321] | 14 |
|
|---|
| 15 | # Constants
|
|---|
| 16 | #
|
|---|
| 17 | VER="4.7.2"
|
|---|
| 18 |
|
|---|
| [25860] | 19 | PREFIX="${ISSM_DIR}/externalpackages/netcdf/install" # Set to location where external package should be installed
|
|---|
| 20 |
|
|---|
| [24321] | 21 | # Environment
|
|---|
| 22 | #
|
|---|
| [24919] | 23 | export CPPFLAGS="-I${CURL_ROOT}/include -I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
|
|---|
| 24 | export LDFLAGS="-L${CURL_ROOT}/lib -L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
|
|---|
| [24321] | 25 |
|
|---|
| 26 | # Download source
|
|---|
| 27 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
|
|---|
| 28 |
|
|---|
| 29 | # Unpack source
|
|---|
| [24641] | 30 | tar -zxvf netcdf-c-${VER}.tar.gz
|
|---|
| [24321] | 31 |
|
|---|
| 32 | # Cleanup
|
|---|
| [25860] | 33 | rm -rf ${PREFIX} src
|
|---|
| 34 | mkdir -p ${PREFIX} src
|
|---|
| [24321] | 35 |
|
|---|
| 36 | # Move source to 'src' directory
|
|---|
| [25860] | 37 | mv netcdf-c-${VER}/* src
|
|---|
| [24641] | 38 | rm -rf netcdf-c-${VER}
|
|---|
| [24321] | 39 |
|
|---|
| 40 | # Configure
|
|---|
| 41 | cd src
|
|---|
| 42 | ./configure \
|
|---|
| [25860] | 43 | --prefix="${PREFIX}" \
|
|---|
| [25073] | 44 | --disable-static \
|
|---|
| [24919] | 45 | --disable-dependency-tracking \
|
|---|
| 46 | --enable-fast-install \
|
|---|
| [25073] | 47 | --disable-doxygen \
|
|---|
| 48 | --disable-testsets \
|
|---|
| [25125] | 49 | --disable-examples \
|
|---|
| 50 | --enable-netcdf4
|
|---|
| [24321] | 51 |
|
|---|
| 52 | # Compile and install
|
|---|
| 53 | if [ $# -eq 0 ]; then
|
|---|
| 54 | make
|
|---|
| 55 | make install
|
|---|
| 56 | else
|
|---|
| 57 | make -j $1
|
|---|
| 58 | make -j $1 install
|
|---|
| 59 | fi
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.