summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a18dfc768289e0ea5193ca46caeb76f1103be938 (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
# Maintainer: Daniel Chesters <archlinux@coin-coin.xyz>

pkgname=python-ollama-git
pkgver=0.1.7.r0.gfcdf577
pkgrel=1
pkgdesc="Ollama Python library"
arch=('any')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
url="https://github.com/ollama/ollama-python"
license=('MIT')
depends=(
	'ollama'
	'python'
	'python-httpx'
	'python-typing_extensions'
)
makedepends=(
	'python-poetry'
	'git'
)
b2sums=('SKIP')

source=("$pkgname::git+https://github.com/ollama/ollama-python.git")

pkgver() {
	cd "$pkgname"
	git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "$pkgname"
	poetry build -f wheel
}

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