Last change
on this file since 25271 was 25271, checked in by jdquinn, 5 years ago |
CHG: Minor fix and cleanup
|
-
Property svn:executable
set to
*
|
File size:
1.6 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 |
|
---|
21 | CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
|
---|
22 | HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
23 | ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
24 |
|
---|
25 | # Environment
|
---|
26 | #
|
---|
27 | export CPPFLAGS="-I${CURL_ROOT}/include -I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
|
---|
28 | export LDFLAGS="-L${CURL_ROOT}/lib -L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
|
---|
29 |
|
---|
30 | # Download source
|
---|
31 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
|
---|
32 |
|
---|
33 | # Unpack source
|
---|
34 | tar -zxvf netcdf-c-$VER.tar.gz
|
---|
35 |
|
---|
36 | # Cleanup
|
---|
37 | rm -rf install src
|
---|
38 | mkdir install src
|
---|
39 |
|
---|
40 | # Move source to 'src' directory
|
---|
41 | mv netcdf-c-$VER/* src/
|
---|
42 | rm -rf netcdf-c-$VER
|
---|
43 |
|
---|
44 | # Configure
|
---|
45 | cd src
|
---|
46 | ./configure \
|
---|
47 | --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
|
---|
48 | --disable-static \
|
---|
49 | --disable-dependency-tracking \
|
---|
50 | --enable-fast-install \
|
---|
51 | --disable-doxygen \
|
---|
52 | --enable-netcdf4 \
|
---|
53 | --disable-filter-testing \
|
---|
54 | --disable-examples \
|
---|
55 | --disable-dap-remote-tests
|
---|
56 |
|
---|
57 | # Compile, test, and install
|
---|
58 | if [ $# -eq 0 ]; then
|
---|
59 | make
|
---|
60 | make check
|
---|
61 | make install
|
---|
62 | else
|
---|
63 | make
|
---|
64 | make -j $1 check
|
---|
65 | make -j $1 install
|
---|
66 | fi
|
---|
67 |
|
---|
68 | # Return to initial directory
|
---|
69 | cd ..
|
---|
Note:
See
TracBrowser
for help on using the repository browser.