From 7538ff2a31a0e68cfb97fd9c605e7cd48cecfbf7 Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Wed, 16 Oct 2024 15:45:24 -0700 Subject: [PATCH] brotli --- 19-brotli.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 8 ++++++++ 2 files changed, 58 insertions(+) create mode 100644 19-brotli.sh diff --git a/19-brotli.sh b/19-brotli.sh new file mode 100644 index 0000000..a02d53b --- /dev/null +++ b/19-brotli.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="brotli-1.1.0.tar.gz" +DNL="https://github.com/google/brotli/archive/v1.1.0/brotli-1.1.0.tar.gz" +SHA256="e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff" + +[ -d brotli-1.1.0 ] && rm -rf brotli-1.1.0 + +if [ ! -f ${TARBALL} ]; then + wget ${DNL} + if [ $? -ne 0 ]; then + echo "Could not retrieve ${DNL}" + echo "Sorry." + exit 1 + fi +fi + +CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" +if [ "${CHECK}" != "${SHA256}" ]; then + echo "${TARBALL} does not match expected SHA256. Sorry." + exit 1 +fi + +tar -zxf ${TARBALL} && cd brotli-1.1.0 + +mkdir build && cd build +cmake -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_BUILD_TYPE=Release \ + .. +make +if [ $? -ne 0 ]; then + echo "Failed building brotli. Sorry." + exit 1 +fi + +echo "running make test" +make test > brotli.test.log 2>&1 + +echo +echo "Inspect brotli-1.1.0/build/brotli.test.log and if looks reasonable," +echo "as root run:" +echo +echo " cd brotli-1.1.0/build" +echo " make install" diff --git a/README.md b/README.md index aea190b..bcabf46 100644 --- a/README.md +++ b/README.md @@ -176,4 +176,12 @@ libarchive, libuv, and nghttp2. * Status: Script Works * Note: Rebuild once GCC Fortran available +Dependency Nineteen: brotli +--------------------------- +Justification: Neded to build GnuTLS and beneficial to future rebuild of cURL. +Requires CMake to build. + +* Script: [`19-brotli.sh`](19-brotli.sh) +* Status: Script Untested +* Note: Python bindings NOT built