This project provides a Dockerfile and RPM spec file to build GDAL from source with Brunsli compression support.
This project simplifies the process of building GDAL with Brunsli support by:
- Dockerized Build: Using a Docker image to provide a consistent and isolated build environment.
- RPM Packaging: Creating an RPM package for distribution and installation on RPM-based systems.
- Brunsli Integration: Including the necessary steps to build and integrate Brunsli into the GDAL build process.
- Docker: Make sure you have Docker installed and running on your system.
- Git: Git is required to clone the Brunsli source code.
The easiest way to build the GDAL Docker image with Brunsli support is to use the provided build script:
./build_gibs-gdal_image.shThis script:
- Sources image name and version information from
version.sh - Detects CPU architecture and adds platform options if needed
- Passes version variables to the Docker build process
- Builds the Docker image using docker/Dockerfile
After building the Docker image, you can extract the RPM files using the provided script:
./extract_rpm.shThis script:
- Creates a temporary container from the built image
- Copies the RPM files from the container to a local
./dist/${RPM_VERSION}directory, where${RPM_VERSION}is automatically set based on the version information inversion.sh. - Removes the temporary container
sudo dnf install ./path/to/gdal-${RPM_VERSION}.x86_64.rpmRun gdalinfo --version
gdal_translate -of JPEG2000 -co QUALITY=50 input.tif output.jp2 #Brunsli Support
Compare the file size of output.jp2 with a JPEG2000 file generated without Brunsli. The Brunsli-compressed file should be 22% smaller.
- Version Information: Edit the
version.shfile to change the GDAL version, release number, or AlmaLinux version. - Dependencies: Adjust the dnf install commands in the Dockerfile to install any additional dependencies required for your specific needs.
- CMake Options: Modify the CMake options in the
%buildsection of the gdal.spec file to customize the GDAL build. - Output Directory: The extracted RPMs will be placed in
./dist/${RPM_VERSION}by default.
*This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details