--- image: ubuntu:bionic variables: GIT_SUBMODULE_STRATEGY: recursive stages: - build build-tesseract: stage: build script: - apt update && apt install -y wget git build-essential curl autoconf automake libtool pkg-config apt-transport-https ppa-purge zsh screen byobu parallel iperf3 iotop atop nethogs htop software-properties-common libicu-dev libpango1.0-dev libcairo2-dev libpng-dev libjpeg-dev libtiff-dev libgif-dev zlib1g-dev liblzma-dev libjbig-dev curl - curl -LO https://github.com/DanBloomberg/leptonica/archive/refs/tags/1.83.1.tar.gz - tar -xf 1.83.1.tar.gz - cd ./leptonica-1.83.1 - ./autogen.sh - LDFLAGS=--static LIBS="-ljbig -llzma" ./configure --disable-shared - make - make install - cd ../ - curl -LO https://github.com/tesseract-ocr/tesseract/archive/refs/tags/5.3.0.tar.gz - tar -xf 5.3.0.tar.gz - cd ./tesseract-5.3.0 - ./autogen.sh - LDFLAGS=--static LIBS="-ljbig -llzma" ./configure --disable-shared - make - make install - cp "$(which tesseract)" . artifacts: paths: - "tesseract-5.3.0/tesseract" when: on_success expire_in: 1 days