Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve snap packaging #1892

Merged
merged 7 commits into from Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Expand Up @@ -107,3 +107,11 @@ kernel*.bin
times.txt
/unlvtests/results*

# snap packaging specific rules
/parts/
/stage/
/prime/
/snap/.snapcraft/

/*.snap
/*_source.tar.bz2
25 changes: 21 additions & 4 deletions snap/snapcraft.yaml
@@ -1,18 +1,28 @@
name: tesseract
version: master
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
If you want to access the files under /media/* or /run/media/* you'll have
to connect the snap to the `core` snap's `removable-media` interface:

$ sudo snap connect tesseract:removable-media

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

apps:
tesseract:
command: env TESSDATA_PREFIX=$SNAP_USER_COMMON tesseract
plugs: [home]
command: >
env
TESSDATA_PREFIX=$SNAP_USER_COMMON
tesseract
plugs:
- home
- removable-media

parts:
tesseract:
Expand All @@ -27,7 +37,14 @@ parts:
- libicu-dev
- libpango1.0-dev
- libcairo2-dev
stage-packages:
- libgomp1
after: [leptonica]
leptonica:
source: https://github.com/DanBloomberg/leptonica/archive/1.74.2.tar.gz
plugin: autotools
stage-packages:
- libjbig0
- libjpeg-turbo8
- libopenjp2-7
- libtiff5