forked from ocrmypdf/OCRmyPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
83 lines (73 loc) · 1.86 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# SPDX-FileCopyrightText: 2022 Alexander Langanke
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0
name: ocrmypdf
title: OCRmyPDF
base: core20
version: git
summary: OCRmyPDF adds optical character recognition (OCR) to PDFs
description: OCRmyPDF packaged for snap
grade: stable
confinement: strict
icon: docs/images/logo-square-256.svg
license: MPL-2.0
architectures: [amd64]
environment:
TESSDATA_PREFIX: $SNAP/usr/share/tesseract-ocr/4.00/tessdata
GS_LIB: $SNAP/usr/share/ghostscript/9.50/Resource/Init
GS_FONTPATH: $SNAP/usr/share/ghostscript/9.50/Resource/Font
LD_LIBRARY_PATH: $SNAP/usr/lib/x86_64-linux-gnu
apps:
ocrmypdf:
command: usr/bin/snapcraft-preload python3 -m ocrmypdf
plugs:
- desktop
- desktop-legacy
- wayland
- x11
- home
- removable-media
parts:
snapcraft-preload:
source: https://github.com/sergiusens/snapcraft-preload.git
plugin: cmake
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr -DLIBPATH=/usr/lib
build-packages:
- on amd64:
- gcc-multilib
- g++-multilib
stage-packages:
- lib32stdc++6
jbig2enc:
plugin: autotools
source: https://github.com/agl/jbig2enc.git
source-tag: '0.29'
build-packages:
- libleptonica-dev
ocrmypdf:
plugin: python
source: https://github.com/ocrmypdf/OCRmyPDF.git
stage-packages:
- ghostscript
- icc-profiles-free
- liblept5
- libxml2
- pngquant
- tesseract-ocr-all
- unpaper
- qpdf
- zlib1g
python-packages:
- cffi
- pdfminer.six
- pikepdf
- Pillow
- pluggy
- reportlab
- setuptools
- tqdm
- pipe
override-build: |
snapcraftctl build
ln -sf ../usr/lib/libsnapcraft-preload.so $SNAPCRAFT_PART_INSTALL/lib/libsnapcraft-preload.so