2022-08-04 03:21:28 -07:00
|
|
|
# SPDX-FileCopyrightText: 2022 Alexander Langanke
|
|
|
|
|
# SPDX-FileCopyrightText: 2022 James R. Barlow
|
2023-04-13 15:06:19 +08:00
|
|
|
# SPDX-FileCopyrightText: 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
|
2022-08-04 03:21:28 -07:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
2022-06-08 01:22:18 -07:00
|
|
|
name: ocrmypdf
|
|
|
|
|
title: OCRmyPDF
|
2026-01-20 11:54:55 -08:00
|
|
|
base: core24
|
2022-06-08 01:22:18 -07:00
|
|
|
version: git
|
2023-09-26 00:37:04 -07:00
|
|
|
summary: OCRmyPDF adds a searchable text layer to scanned PDF files
|
2022-06-08 01:22:18 -07:00
|
|
|
description: OCRmyPDF packaged for snap
|
|
|
|
|
grade: stable
|
|
|
|
|
confinement: strict
|
2022-06-09 16:59:20 -07:00
|
|
|
icon: docs/images/logo-square-256.svg
|
|
|
|
|
license: MPL-2.0
|
2022-06-08 01:22:18 -07:00
|
|
|
|
2026-01-20 11:54:55 -08:00
|
|
|
platforms:
|
|
|
|
|
amd64:
|
2022-06-08 01:22:18 -07:00
|
|
|
|
|
|
|
|
environment:
|
2026-01-20 11:54:55 -08:00
|
|
|
TESSDATA_PREFIX: $SNAP/usr/share/tesseract-ocr/5/tessdata
|
|
|
|
|
GS_LIB: $SNAP/usr/share/ghostscript/10.02.1/Resource/Init
|
|
|
|
|
GS_FONTPATH: $SNAP/usr/share/ghostscript/10.02.1/Resource/Font
|
2022-06-08 01:22:18 -07:00
|
|
|
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
|
|
|
|
|
|
2022-08-03 07:35:01 +08:00
|
|
|
jbig2enc:
|
|
|
|
|
plugin: autotools
|
|
|
|
|
source: https://github.com/agl/jbig2enc.git
|
2023-09-20 17:01:36 -07:00
|
|
|
source-tag: "0.29"
|
2022-08-03 07:35:01 +08:00
|
|
|
build-packages:
|
|
|
|
|
- libleptonica-dev
|
|
|
|
|
|
2022-06-08 01:22:18 -07:00
|
|
|
ocrmypdf:
|
|
|
|
|
plugin: python
|
2023-04-13 15:06:19 +08:00
|
|
|
source: .
|
|
|
|
|
|
|
|
|
|
build-packages:
|
|
|
|
|
- python3-pip
|
2022-06-08 01:22:18 -07:00
|
|
|
|
|
|
|
|
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
|
2023-04-13 15:06:19 +08:00
|
|
|
- wheel
|
2022-06-08 01:22:18 -07:00
|
|
|
|
|
|
|
|
override-build: |
|
2026-01-20 11:54:55 -08:00
|
|
|
craftctl default
|
|
|
|
|
ln -sf ../usr/lib/libsnapcraft-preload.so $CRAFT_PART_INSTALL/lib/libsnapcraft-preload.so
|