summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ebcbd99ba78ed85ec46d8a2815b4b83afbb2751d (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
68
69
70
71
72
73
# Maintainer: Xavier Francisco <echo moc.liamg@ocsicnarf.n.reivax | rev>

_pkgname=docmancer
pkgname=$_pkgname-git
pkgver=r241.6e0a35b
pkgrel=1
pkgdesc="Fetch docs, embed locally, expose to AI agents via skills"
arch=('any')
url="https://github.com/docmancer/docmancer"
license=('MIT')
depends=(
  'python>=3.11'
  'python-pydantic'
  'python-pydantic-settings'
  'python-httpx'
  'python-click'
  'python-yaml'
  'python-filelock'
  'python-trafilatura'
  'python-markdownify'
  'python-w3lib'
  'python-ultimate-sitemap-parser'
  'python-beautifulsoup4'
  'python-jsonschema'
  'python-sqlite-vec'
  'python-model2vec'
  'python-charset-normalizer'
  'python-pypdf'
  # cli/__main__.py transitively imports docmancer.cloud at startup, which
  # needs these three even when cloud sync is never used
  'python-rfc8785'
  'python-keyring'
  'python-pynacl'
)
# striprtf (RTF loader) is unpackaged on Arch; the loader degrades gracefully without it.
optdepends=(
  'python-pdfplumber: PDF table/layout extraction fallback'
  'python-docx: DOCX ingestion'
  'python-mcp: MCP server (docmancer mcp; pulls starlette + sse-starlette)'
  'python-fastembed: heavy ONNX embeddings provider'
  'python-qdrant-client: qdrant vector store backend'
  'python-playwright: browser extraction'
  'python-datasets: benchmark datasets'
  'python-openai: OpenAI benchmark provider'
  'python-anthropic: Anthropic benchmark provider'
  'python-google-genai: Gemini benchmark provider'
)
makedepends=('git' 'python-build' 'python-installer' 'python-hatchling')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git+https://github.com/docmancer/docmancer.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$_pkgname"
  # --no-isolation: build against Arch's hatchling instead of downloading one at
  # build time. Upstream pins hatchling<1.27 (metadata conservatism); the wheel
  # builds and installs correctly with current hatchling, so skip the dep check.
  # Upstream's requires-python <3.14 cap is likewise metadata-only: the package
  # runs on Arch's 3.14 (exercised end-to-end: index, embed, hybrid query).
  python -m build --wheel --no-isolation --skip-dependency-check
}

package() {
  cd "$_pkgname"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}