ubarsc / kealib

KEALib provides an implementation of the GDAL data model. The format supports raster attribute tables, image pyramids, meta-data and in-built statistics while also handling very large files and compression throughout.
http://kealib.org/
MIT License
12 stars 7 forks source link

Check that the library and gdal plugin can be built in one invocation #36

Closed gillins closed 1 year ago

gillins commented 1 year ago

Without having to call cmake twice.

gillins commented 1 year ago

@maxfenv this appears to be fixed in the latest version. See Dockerfile below which runs fine for me.

FROM ubuntu:22.04

# Needed in case tzdata gets upgraded
ENV TZ=Australia/Brisbane
ARG DEBIAN_FRONTEND=noninteractive

# Use Aussie mirrors
RUN sed -i 's/http:\/\/archive./http:\/\/au.archive./g' /etc/apt/sources.list

# Update Ubuntu software stack and install base GDAL stack
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y wget g++ cmake libhdf5-dev libgdal-dev gdal-bin

RUN apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*

ENV KEALIB_VERSION=1.5.1
RUN cd /tmp \
    && wget -q https://github.com/ubarsc/kealib/releases/download/kealib-${KEALIB_VERSION}/kealib-${KEALIB_VERSION}.tar.gz \
    && tar xf kealib-${KEALIB_VERSION}.tar.gz \
    && cd kealib-${KEALIB_VERSION} \
    && mkdir build \
    && cd build \
    && cmake -D LIBKEA_WITH_GDAL=ON .. \
    && make \
    && make install \
    && cd ../.. \
    && rm -rf kealib-${KEALIB_VERSION} kealib-${KEALIB_VERSION}.tar.gz

ENV LD_LIBRARY_PATH=/usr/local/lib
ENV GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins

RUN gdal_translate --formats | grep KEA