Skip to content

Instantly share code, notes, and snippets.

@nicerobot
Last active January 18, 2016 19:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicerobot/5160658 to your computer and use it in GitHub Desktop.
Save nicerobot/5160658 to your computer and use it in GitHub Desktop.
pkg-config for gdal to allow go-gdal to build
curl -ks 'https://gist.githubusercontent.com/nicerobot/5160658/raw/install-gdalpc.sh' | sudo bash -
prefix=$(gdal-config --prefix)
exec_prefix='${prefix}'
libdir='${exec_prefix}/lib'
includedir='${exec_prefix}/include'
datadir=$(gdal-config --datadir)
Name: libgdal
Description: Geospatial Data Abstraction Library
Version: $(gdal-config --version)
Libs: $(gdal-config --libs)
Cflags: $(gdal-config --cflags)
#!/bin/bash
which gdal-config || exit ${LINENO}
cd /usr/lib/pkgconfig || exit ${LINENO}
[ -r gdal.pc ] && exit ${LINENO}
curl -ks 'https://gist.githubusercontent.com/nicerobot/5160658/raw/gdal.pc.template' \
| sed -e 's/^/echo /' \
| bash - \
> ${1:-gdal.pc}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment