-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPKGBUILD
More file actions
93 lines (83 loc) · 2.68 KB
/
Copy pathPKGBUILD
File metadata and controls
93 lines (83 loc) · 2.68 KB
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
84
85
86
87
88
89
90
91
92
93
# Maintainer: Bruno Goncalves <bigbruno@gmail.com>
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=bigocrpdf
pkgdesc="The simplest way to apply OCR to your PDF files, making it possible to search and copy texts from scanned files."
depends=(
'gtk4>=4.14'
'libadwaita>=1.5'
'hicolor-icon-theme'
'python>=3.12'
'python-gobject'
'python-cairo'
# RapidOCR core
'python-rapidocr'
'rapidocr-fonts'
# Unified PP-OCRv6 model (Chinese, English, Japanese and Latin scripts)
'rapidocr-models-v6-small'
# OCR inference backend
'python-openvino'
# PDF processing
'python-pikepdf'
'python-pillow'
'python-reportlab'
'poppler'
# Image processing
'python-opencv'
'python-numpy'
# Dewarp dependencies (for curved page correction)
'python-scipy'
# ODF export
'python-odfpy'
)
makedepends=(
'gettext'
'git'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)
# Rolling package: the build fires on every push and the version is the build
# date, which is also where the published artifact tags get their name
# (bigocrpdf-26.06.18-0243-x86_64). Pinning a tag here instead broke the build
# on a tag that was never created, and would have been wrong even if it had
# been: .github/workflows/build-package.yml passes the pushed *branch* to the
# builder, so a tag in the source line would build the same commit whatever
# branch was pushed.
pkgver=$(date +%y.%m.%d)
pkgrel=$(date +%H%M)
arch=('any')
license=('GPL-3.0-or-later')
url="https://github.com/biglinux/bigocrpdf"
options=('!strip')
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')
optdepends=(
# Resource detection
'python-psutil: accurate available-memory detection'
# Screenshot capture
'spectacle: screenshot capture on KDE Plasma'
'gnome-screenshot: screenshot capture on GNOME'
'flameshot: cross-desktop screenshot capture'
# File manager integration
'python-nautilus: GNOME Files (Nautilus) context menu integration'
'nemo-python: Nemo file manager context menu integration'
# Alternative inference backend
'python-onnxruntime: Alternative inference backend (fallback)'
# PDF/A ICC profile fallback
'ghostscript: sRGB ICC profile for PDF/A-2b conversion'
# Optional best compression for bilevel PDF output
'jbig2enc: smaller Black & White PDF output; CCITT G4 is used when absent'
)
build() {
cd "${srcdir}/${pkgname}" || return 1
rm -rf "${srcdir}/dist"
python -m build --wheel --no-isolation --skip-dependency-check --outdir "${srcdir}/dist"
}
package() {
cd "${srcdir}/${pkgname}" || return 1
# Install Python wheel
python -m installer --destdir="$pkgdir" "${srcdir}"/dist/*.whl
# Install metadata and compile gettext catalogs without modifying the source tree.
bash tools/stage-data.sh "$pkgdir"
}