blob: 9659d3763608a8a07dc311ff51bfc57eab71ae9e (
plain)
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=acceptarium-git
pkgver=0.0.0.r166.g0d2ffd9
pkgrel=1
pkgdesc='CLI tool to facilitate digitized receipt handling in plain text accounting workflows'
arch=(x86_64)
url="https://codeberg.org/plaintextaccounting/${pkgname%-git}"
license=(AGPL-3.0-only)
depends=(git
git-annex
glibc # libc.so libm.so
chafa libchafa.so
libgcc libgcc_s.so
libgit2 libgit2.so
zlib libz.so
zsh)
makedepends=(cargo
imagemagick
ollama
tesseract
jq)
optdepends=('imagemagick: convert PDFs prior to OCR'
'ollama: extract data from images or OCR using local models'
'tesseract: process using OCR')
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=("git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
git describe --long --abbrev=7 --tags --match="v*" |
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${pkgname%-git}"
sed Makefile.am -i -e "/^licensedir = /s#.(_acceptarium)\$#$pkgname#"
./bootstrap.sh
cargo fetch --locked --target host-tuple
}
_srcenv() {
cd "${pkgname%-git}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export CARGO_FEATURE_FLAGS==--offline
export LIBGIT2_NO_VENDOR=1
CFLAGS+=' -ffat-lto-objects'
}
build() {
_srcenv
./configure --prefix="/usr" --with-imagemagick --with-ollama --with-tesseract
make
}
check() {
_srcenv
make check
}
package() {
cd "${pkgname%-git}"
make DESTDIR="$pkgdir" install
}
|