Fixed app-misc/ollama-0.5.7 warnings && added acct-group/ollama && added acct-user/ollama

This commit is contained in:
saundersp 2025-02-12 16:37:28 +01:00
parent f86901cf88
commit 5a46e5a626
9 changed files with 89 additions and 19 deletions

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>negril.nx+gentoo@gmail.com</email>
<name>Paul Zander</name>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,9 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-group
DESCRIPTION="A group for ollama"
ACCT_GROUP_ID=-1

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>negril.nx+gentoo@gmail.com</email>
<name>Paul Zander</name>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,14 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-user
DESCRIPTION="A user for ollama"
ACCT_USER_ID=-1
ACCT_USER_HOME=/var/lib/ollama
ACCT_USER_HOME_PERMS=0700
ACCT_USER_GROUPS=( ollama )
acct-user_add_deps

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>negril.nx+gentoo@gmail.com</email>
<name>Paul Zander</name>
</maintainer>
<longdescription lang="en">
Get up and running with large language models.
Run Llama 3.3, DeepSeek-R1, Phi-4, Mistral, Gemma 2, and other models, locally.
</longdescription>
<use>
<flag name="rocm">Enable ROCm gpu computing support</flag>
</use>
<upstream>
<remote-id type="github">ollama/ollama</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,23 +1,21 @@
EAPI=8 EAPI=8
DESCRIPTION='Get up and running with Llama 3, Mistral, Gemma, and other large language models.' DESCRIPTION='Get up and running with large language models.'
HOMEPAGE='https://ollama.com' HOMEPAGE='https://ollama.com https://github.com/ollama/ollama'
SRC_MAIN_URI='https://github.com/ollama/ollama/releases/download/v'
SRC_URI="
amd64? ( ${SRC_MAIN_URI}${PV}/ollama-linux-amd64.tgz -> $P.amd64.tgz )
arm64? ( ${SRC_MAIN_URI}${PV}/ollama-linux-arm64.tgz -> $P.arm64.tgz )
rocm? ( ${SRC_MAIN_URI}${PV}/ollama-linux-amd64-rocm.tgz -> $P.rocm.tgz )
"
S="${WORKDIR}"
LICENSE='MIT' LICENSE='MIT'
SLOT='0' SLOT='0'
KEYWORDS='~amd64 ~arm64' KEYWORDS='~amd64 ~arm64'
IUSE='+systemd -rocm' IUSE='+systemd rocm'
DEPEND='acct-user/ollama acct-group/ollama' DEPEND='acct-user/ollama acct-group/ollama'
RDEPEND='acct-user/ollama acct-group/ollama' RDEPEND='acct-user/ollama acct-group/ollama'
S="${WORKDIR}"
RESTRICT='strip' RESTRICT='strip'
inherit xdg-utils
SRC_URI="
amd64? ( https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-amd64.tgz -> $P.amd64.tgz )
arm64? ( https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-arm64.tgz -> $P.arm64.tgz )
rocm? ( https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-amd64-rocm.tgz -> $P.rocm.tgz )
"
src_unpack() { src_unpack() {
if use rocm; then if use rocm; then
tar -xzvf "${DISTDIR}/${P}.rocm.tgz" -C "${WORKDIR}" || die "Can't extract rocm tgz" tar -xzvf "${DISTDIR}/${P}.rocm.tgz" -C "${WORKDIR}" || die "Can't extract rocm tgz"
@ -33,7 +31,7 @@ src_install() {
doexe "${WORKDIR}/bin/ollama" || die 'Failed to install binary' doexe "${WORKDIR}/bin/ollama" || die 'Failed to install binary'
insinto /opt/Ollama/lib/ insinto /opt/Ollama/lib/
doins -r "${WORKDIR}/lib/ollama/" || die 'Failed to install libraries' doins -r "${WORKDIR}/lib/ollama/" || die 'Failed to install libraries'
dosym /opt/Ollama/bin/ollama /opt/bin/ollama dosym -r /opt/Ollama/bin/ollama /opt/bin/ollama
} }
src_prepare() { src_prepare() {

View File

@ -0,0 +1,8 @@
DEFINED_PHASES=install preinst pretend
DESCRIPTION=A group for ollama
EAPI=8
INHERIT=acct-group
KEYWORDS=~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris
SLOT=0
_eclasses_=user-info 9951b1a0e4f026d16c33a001fd2d5cdf acct-group c2bb1fc7bada6e119b3ce202ca42476f
_md5_=b1c6c700457ef1feb40484683cfe39da

View File

@ -0,0 +1,9 @@
DEFINED_PHASES=install postinst preinst prerm pretend
DESCRIPTION=A user for ollama
EAPI=8
INHERIT=acct-user
KEYWORDS=~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris
RDEPEND=acct-group/ollama
SLOT=0
_eclasses_=user-info 9951b1a0e4f026d16c33a001fd2d5cdf acct-user a4bf64e6c32b95705287346a2b678ae1
_md5_=6fae0720a55e9789f1d73ec46249675f

View File

@ -1,15 +1,13 @@
DEFINED_PHASES=install postinst prepare unpack DEFINED_PHASES=install postinst prepare unpack
DEPEND=acct-user/ollama acct-group/ollama DEPEND=acct-user/ollama acct-group/ollama
DESCRIPTION=Get up and running with Llama 3, Mistral, Gemma, and other large language models. DESCRIPTION=Get up and running with large language models.
EAPI=8 EAPI=8
HOMEPAGE=https://ollama.com HOMEPAGE=https://ollama.com https://github.com/ollama/ollama
INHERIT=xdg-utils IUSE=+systemd rocm
IUSE=+systemd -rocm
KEYWORDS=~amd64 ~arm64 KEYWORDS=~amd64 ~arm64
LICENSE=MIT LICENSE=MIT
RDEPEND=acct-user/ollama acct-group/ollama RDEPEND=acct-user/ollama acct-group/ollama
RESTRICT=strip RESTRICT=strip
SLOT=0 SLOT=0
SRC_URI=amd64? ( https://github.com/ollama/ollama/releases/download/v0.5.7/ollama-linux-amd64.tgz -> ollama-bin-0.5.7.amd64.tgz ) arm64? ( https://github.com/ollama/ollama/releases/download/v0.5.7/ollama-linux-arm64.tgz -> ollama-bin-0.5.7.arm64.tgz ) rocm? ( https://github.com/ollama/ollama/releases/download/v0.5.7/ollama-linux-amd64-rocm.tgz -> ollama-bin-0.5.7.rocm.tgz ) SRC_URI=amd64? ( https://github.com/ollama/ollama/releases/download/v0.5.7/ollama-linux-amd64.tgz -> ollama-bin-0.5.7.amd64.tgz ) arm64? ( https://github.com/ollama/ollama/releases/download/v0.5.7/ollama-linux-arm64.tgz -> ollama-bin-0.5.7.arm64.tgz ) rocm? ( https://github.com/ollama/ollama/releases/download/v0.5.7/ollama-linux-amd64-rocm.tgz -> ollama-bin-0.5.7.rocm.tgz )
_eclasses_=xdg-utils 42869b3c8d86a70ef3cf75165a395e09 _md5_=ffde7cc385e393fe5c1947991988913d
_md5_=26da341ee10214bf82979efddfefa143