Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
50 lines (37 sloc) 1.44 KB
#!/bin/bash
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
# install sources
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
sudo add-apt-repository -y ppa:opencpu/jq
sudo apt-get --yes --force-yes update -qq
# install packages
sudo apt-get install --yes libprotobuf-dev protobuf-compiler libv8-3.14-dev
sudo apt-get install libjq-dev
# units/udunits2 dependency:
sudo apt-get install --yes libudunits2-dev
# sf dependencies:
sudo apt-get install --yes libproj-dev libgeos-dev libgdal-dev
# postgis source compile dependencies:
sudo apt-get --yes install libjson-c-dev postgresql-server-dev-9.6
# activate liblwgeom by:
# sudo ldconfig
# install postgis from source:
wget http://download.osgeo.org/postgis/source/postgis-2.4.3.tar.gz
(mv postgis* /tmp; cd /tmp; tar xzf postgis-2.4.3.tar.gz)
(cd /tmp/postgis-2.4.3 ; ./configure; make; sudo make install)
# create postgis databases:
sudo service postgresql restart
createdb postgis
psql -d postgis -c "CREATE EXTENSION postgis;"
psql -d postgis -c "GRANT CREATE ON DATABASE postgis TO travis"
psql -d postgis -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO travis"
createdb empty
psql -d empty -c "CREATE EXTENSION postgis;"
elif [[ $TRAVIS_OS_NAME == 'osx' ]]; then
# update directories
sudo chown -R $(whoami) /usr/local/share/man/man7
chmod u+w /usr/local/share/man/man7
# homebrew
brew update
brew install udunits
fi
You can’t perform that action at this time.