name: tesseract
version: master
summary: open source optical character recognition engine
description: |
  Tesseract has unicode (UTF-8) support, and can recognize more than 100
  languages "out of the box". It can be trained to recognize other languages.
  Tesseract supports various output formats: plain-text, hocr(html), pdf.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict

apps:
  tesseract:
    command: env TESSDATA_PREFIX=$SNAP_USER_COMMON tesseract
    plugs: [home]

parts:
  tesseract:
    source: .
    plugin: autotools
    build-packages:
      - pkg-config
      - libpng12-dev
      - libjpeg8-dev
      - libtiff5-dev
      - zlib1g-dev
      - libicu-dev
      - libpango1.0-dev
      - libcairo2-dev
    after: [leptonica]
  leptonica:
    source: https://github.com/DanBloomberg/leptonica/archive/1.74.2.tar.gz
    plugin: autotools

name: tesseract
version: git
summary: open source optical character recognition engine
description: |
  Tesseract has unicode (UTF-8) support, and can recognize more than 100
  languages "out of the box". It can be trained to recognize other languages.
  Tesseract supports various output formats: plain-text, hocr(html), pdf.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict

apps:
  tesseract:
    command: env TESSDATA_PREFIX=$SNAP_USER_COMMON tesseract
    plugs: [home]

parts:
  tesseract:
    source: .
    plugin: autotools
    build-packages:
      - pkg-config
      - libpng12-dev
      - libjpeg8-dev
      - libtiff5-dev
      - zlib1g-dev
      - libicu-dev
      - libpango1.0-dev
      - libcairo2-dev
    after: [leptonica]
  leptonica:
    source: https://github.com/DanBloomberg/leptonica/archive/1.74.2.tar.gz
    plugin: autotools

Use automatic git-based versioning for the snap
Use automatic git-based versioning for the snap

Snapcraft supports automatic `git describe` based versioning when the
`version` key is set to `git`.  This gives more information of the
source status of a snap distribution.

Refer-to: Snapcraft.yaml reference - doc - snapcraft.io
<https://forum.snapcraft.io/t/snapcraft-yaml-reference/4276>
Signed-off-by: 林博仁(Buo-ren, Lin) <e1a755dad2798d70422023dceee1245c3d6b4517@gmail.com>
