View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit check-reqs unpacker
DESCRIPTION="Local runner for LLMs"
HOMEPAGE="https://ollama.com/
https://github.com/ollama/ollama/"
SRC_URI="
amd64? (
https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-amd64.tar.zst
-> ollama-${PV}-linux-amd64-github-releases.tar.zst
)
arm64? (
https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-arm64.tar.zst
-> ollama-${PV}-linux-arm64-github-releases.tar.zst
)
"
S="${WORKDIR}"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="amd64 ~arm64"
RESTRICT="test"
CHECKREQS_DISK_BUILD="5G"
QA_PREBUILT="*"
pkg_setup() {
check-reqs_pkg_setup
}
src_test() {
:
}
src_install() {
insinto "/opt/${P}"
insopts -m0755
doins -r ./bin
doins -r ./lib
dosym -r "/opt/${P}/bin/ollama" "/usr/bin/ollama"
dostrip -x "/opt/${P}/bin/ollama"
}
pkg_postinst() {
einfo "Browse available models at: https://ollama.com/library/"
}