Skip to content

Instantly share code, notes, and snippets.

@mbklein
Last active February 22, 2022 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbklein/6912fb117ef440ee57799318defe0963 to your computer and use it in GitHub Desktop.
Save mbklein/6912fb117ef440ee57799318defe0963 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "Installing libvips dependencies via yum"
yum groupinstall -y "Development Tools"
yum install -y curl jq \
gtk-doc libxml2-devel libjpeg-turbo-devel libpng-devel libtiff-devel libexif-devel libgsf-devel lcms-devel ImageMagick-devel gobject-introspection-devel libwebp-devel \
libpng-devel libxml2-devel
vips_release=$(curl -s https://api.github.com/repos/libvips/libvips/releases | jq -r '.[0]')
vips_release_version=$(jq -r '.name' <<< $vips_release)
vips_tarball_url=$(jq -r '.tarball_url' <<< $vips_release)
install_libvips_from_source() {
echo "Compiling libvips $vips_version_latest_major_minor.$vips_version_latest_patch from source"
curl -Lo vips-$vips_release_version.tar.gz $vips_tarball_url
target_dir=$(tar tzf vips-$vips_release_version.tar.gz | head -1 | tr -d '/')
tar zvxf vips-$vips_release_version.tar.gz
cd $target_dir
./configure --disable-debug --disable-docs --disable-static --disable-introspection --enable-cxx=yes --without-python --without-orc --without-fftw --with-webp $1
make
make install
cd ..
rm -rf $target_dir
rm vips-$vips_release_version.tar.gz
ldconfig
echo "Installed libvips $vips_release_version"
}
install_libvips_from_source "--prefix=/usr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment