dev-ml/ollama: add missing pipe exit status check

Fix variable order
Remove redundant file mode change
Add braces to variable

Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2024-07-11 02:50:34 +02:00
parent ec9321fa79
commit 4e7eaeaafe

View File

@@ -13,6 +13,11 @@ SLOT="0"
IUSE="nvidia amd" IUSE="nvidia amd"
RDEPEND="
acct-group/ollama
acct-user/ollama
"
IDEPEND="${RDEPEND}"
BDEPEND=" BDEPEND="
>=dev-lang/go-1.21.0 >=dev-lang/go-1.21.0
>=dev-build/cmake-3.24 >=dev-build/cmake-3.24
@@ -24,16 +29,6 @@ BDEPEND="
) )
" "
RDEPEND="
acct-group/ollama
acct-user/ollama
"
IDEPEND="
acct-group/ollama
acct-user/ollama
"
pkg_pretend() { pkg_pretend() {
if use amd; then if use amd; then
ewarn "WARNING: AMD & Nvidia support in this ebuild are experimental" ewarn "WARNING: AMD & Nvidia support in this ebuild are experimental"
@@ -53,8 +48,9 @@ src_compile() {
VERSION=$( VERSION=$(
git describe --tags --first-parent --abbrev=7 --long --dirty --always \ git describe --tags --first-parent --abbrev=7 --long --dirty --always \
| sed -e "s/^v//g" | sed -e "s/^v//g"
assert
) )
export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\"'" export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=${VERSION}\"'"
ego generate ./... ego generate ./...
ego build . ego build .
@@ -63,7 +59,6 @@ src_compile() {
src_install() { src_install() {
dobin ollama dobin ollama
doinitd "${FILESDIR}"/ollama doinitd "${FILESDIR}"/ollama
fperms 0755 /etc/init.d/ollama
} }
pkg_preinst() { pkg_preinst() {