Last change
on this file since 25125 was 25125, checked in by jdquinn, 5 years ago |
CHG: Saving progress on MATLAB -> Python translations; cleanup
|
-
Property svn:executable
set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | set -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 | #
|
---|
19 | VER="4.7.2"
|
---|
20 | CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
|
---|
21 | HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
22 | ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
23 |
|
---|
24 | # Environment
|
---|
25 | #
|
---|
26 | export CPPFLAGS="-I${CURL_ROOT}/include -I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
|
---|
27 | export LDFLAGS="-L${CURL_ROOT}/lib -L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
|
---|
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
|
---|
33 | tar -zxvf netcdf-c-${VER}.tar.gz
|
---|
34 |
|
---|
35 | # Cleanup
|
---|
36 | rm -rf install src
|
---|
37 | mkdir install src
|
---|
38 |
|
---|
39 | # Move source to 'src' directory
|
---|
40 | mv netcdf-c-${VER}/* src/
|
---|
41 | rm -rf netcdf-c-${VER}
|
---|
42 |
|
---|
43 | # Configure
|
---|
44 | cd src
|
---|
45 | ./configure \
|
---|
46 | --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
|
---|
47 | --disable-static \
|
---|
48 | --disable-dependency-tracking \
|
---|
49 | --enable-fast-install \
|
---|
50 | --disable-doxygen \
|
---|
51 | --disable-testsets \
|
---|
52 | --disable-examples \
|
---|
53 | --enable-netcdf4
|
---|
54 |
|
---|
55 | # Compile and install
|
---|
56 | if [ $# -eq 0 ]; then
|
---|
57 | make
|
---|
58 | make install
|
---|
59 | else
|
---|
60 | make -j $1
|
---|
61 | make -j $1 install
|
---|
62 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.