#!/bin/bash

package=lz4
version=-r129

# compiling subversion 1.10.x required lz4 r129, which means LZ4 github revision 129
# Gemini said click on the Releases link on RHS of LZ4 github page
# and there find the page for download page for the required revision
# This was https://github.com/lz4/lz4/releases/tag/r129
# and the actual tarball download link the page links to is not https://github.com/lz4/lz4/archive/refs/tags/r129.tar.gz
# but https://codeload.github.com/lz4/lz4/tar.gz/refs/tags/r129

progname=$0

source ../cascade-make/lib/cascade-lib.bash GEXTSVN ../.. $*

prefix=$GEXTSVN_INSTALLED

opt_run_untar $force_untar $auto_untar $package $version
#opt_run_configure $force_config $auto_config $package $version $prefix

# GEMINI instructions for compiling
# Additional Compilation Options:
#
#    Static vs. Dynamic Library:
#    By default, make might build both. To explicitly build only a static library, you might use make BUILD_STATIC=yes. To build only a dynamic library, use make BUILD_STATIC=no.
#    Custom Installation Prefix:
#    To install to a different location than the system default (e.g., /usr/local), specify the PREFIX variable: 
#
#Code
#
#    sudo make PREFIX=/opt/lz4 install

opt_run_make $compile   $package $version
#opt_run_make $install PREFIX=$prefix/  $package $version "install"
opt_run_make $install   $package $version "PREFIX=$prefix install"
#make PREFIX=$prefix "install"
opt_run_make $clean     $package $version "clean"
opt_run_make $distclean $package $version "distclean"

opt_run_tarclean $tarclean $package $version




