makedeb


ollama 0.1.30-1


Get up and running with large language models locally

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for ollama.

# Maintainer: Hunter Wittenborn <hunter@hunterwittenborn.com>
pkgname=ollama
pkgver=0.1.30
pkgrel=1
pkgdesc='Get up and running with large language models locally'
arch=('any')
makedepends=('cmake' 'golang-go')
license=('MIT')
url='https://ollama.com'

source=(
    "git+https://github.com/ollama/ollama#tag=v${pkgver}"
    'ollama.service'
    'sysusers.conf'
    'tmpfiles.d'
)
sha256sums=(
    'SKIP'
    'SKIP'
    'SKIP'
    'SKIP'
)

build() {
    cd "${pkgname}/"
    git submodule update --init
    go generate ./...
    go build -buildmode=pie -trimpath -ldflags="-X=github.com/ollama/ollama/version.Version=$pkgver"
}

package() {
    install -Dm 755 "${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
    install -dm 755 "${pkgdir}/var/lib/ollama"
    install -Dm 644 ollama.service "${pkgdir}/usr/lib/systemd/system/ollama.service"
    install -Dm 644 sysusers.conf "${pkgdir}/usr/lib/sysusers.d/ollama.conf"
    install -Dm 644 tmpfiles.d "${pkgdir}/usr/lib/tmpfiles.d/ollama.conf"
}

# vim: set sw=4 expandtab: