-
-
Save Lathanao/b366233544ec337427477d6a51491ff9 to your computer and use it in GitHub Desktop.
Install Mozjpeg 4 on debian / Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "" | |
echo "---------------------------------" | |
echo "| AUTO COMPILE MOZJPEG |" | |
echo "---------------------------------" | |
echo "" | |
echo "Apt update" | |
sudo apt update && apt upgrade && apt remove $(deborphan) && apt autoremove && apt clean | |
echo "Update" | |
sudo apt update | |
echo "-----------------------" | |
echo "Installing build-essential" | |
sudo apt install build-essential libboost-all-dev pkg-config -y | |
echo "-----------------------" | |
echo "Installing compiler" | |
sudo apt install autoconf automake libtool nasm make cmake flex -y | |
echo "-----------------------" | |
echo "Installing lib tool for image manipulation" | |
sudo apt install libpng-tools libpng-dev zlib1g-dev -y | |
echo "-----------------------" | |
echo "Installing imagemagick" | |
sudo apt install imagemagick | |
echo "-----------------------" | |
echo "Installing optipng and advdef" | |
sudo apt install optipng advancecomp | |
echo "-----------------------" | |
echo "Installing gnu parallel" | |
sudo apt install parallel | |
echo "-----------------------" | |
echo "Cloning mozjpeg packages" | |
cd /opt | |
sudo git clone https://github.com/mozilla/mozjpeg.git | |
cd mozjpeg | |
echo "-----------------------" | |
echo "compilling mozjpeg" && cat CMakeLists.txt | grep "set(VERSION" | |
sudo cmake . | |
sudo make | |
sudo rm /usr/bin/cjpeg | |
sudo ln -s /opt/mozjpeg/cjpeg /usr/bin/ | |
cjpeg -v | |
# TODO check why it's failing | |
# make cmake -G"Unix Makefiles" -CFLAGS=-m64 -LDFLAGS=-m64 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment