Last change
on this file since 24686 was 24325, checked in by jdquinn, 5 years ago |
CHG: Generalizing install scripts for use on both Ubuntu and macOS.
|
-
Property svn:executable
set to
*
|
File size:
893 bytes
|
Rev | Line | |
---|
[24325] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | # Constants
|
---|
| 6 | #
|
---|
| 7 | VER="6.2.1"
|
---|
| 8 |
|
---|
| 9 | ## Environnment
|
---|
| 10 | #
|
---|
| 11 |
|
---|
| 12 | # NOTE: On macOS, SQLite3 should be installed by default, but PROJ currently
|
---|
| 13 | # requires,
|
---|
| 14 | #
|
---|
| 15 | # SQLITE3_LIBS="-lsqlite3".
|
---|
| 16 | #
|
---|
| 17 | # On Ubuntu Linux, install the SQLite3 binary, libraries and headers
|
---|
| 18 | # with,
|
---|
| 19 | #
|
---|
| 20 | # `apt-get install sqlite3 libsqlite3-dev`
|
---|
| 21 | #
|
---|
| 22 | export SQLITE3_LIBS="-lsqlite3"
|
---|
| 23 |
|
---|
| 24 | # Cleanup
|
---|
| 25 | rm -rf install src
|
---|
| 26 | mkdir install src
|
---|
| 27 |
|
---|
| 28 | # Download source
|
---|
| 29 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "http://issm.jpl.nasa.gov/files/externalpackages/proj-${VER}.tar.gz" "proj-${VER}.tar.gz"
|
---|
| 30 |
|
---|
| 31 | # Unpack source
|
---|
| 32 | tar -zxvf proj-$VER.tar.gz
|
---|
| 33 |
|
---|
| 34 | # Move source into 'src' directory
|
---|
| 35 | mv proj-$VER/* src
|
---|
| 36 | rm -rf proj-$VER
|
---|
| 37 |
|
---|
| 38 | # Configure
|
---|
| 39 | cd src
|
---|
| 40 | ./configure \
|
---|
| 41 | --prefix="${ISSM_DIR}/externalpackages/proj/install"
|
---|
| 42 |
|
---|
| 43 | # Compile and install
|
---|
| 44 | if [ $# -eq 0 ]; then
|
---|
| 45 | make
|
---|
| 46 | make check
|
---|
| 47 | make install
|
---|
| 48 | else
|
---|
| 49 | make -j $1
|
---|
| 50 | make -j $1 check
|
---|
| 51 | make -j $1 install
|
---|
| 52 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.