## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.18.0 # go2rpm -p vendor -v 0.12.11 --name ollama github.com/ollama/ollama %bcond check 0 # bundled GGML sources are missing ppc64le and s390x ExcludeArch: ppc64le s390x # Build the next version of ollama %bcond next 0 # systemd testing %bcond systemd 1 # https://github.com/ollama/ollama %global goipath github.com/ollama/ollama %if %{with next} Version: 0.32.8 %else Version: 0.33.1 %endif %gometa -L -f Name: ollama Release: %autorelease Summary: Get up and running with OpenAI gpt-oss, DeepSeek-R1, Gemma 3 and other models # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND BSL-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC0-1.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND LicenseRef-scancode-protobuf AND MIT AND NCSA AND NTP AND OpenSSL AND ZPL-2.1 AND Zlib URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml %if %{with systemd} Source10: ollama.service Source11: ollama.sysusers %endif Patch1: 0001-ollama-download-env-variables.patch Patch2: 0001-ollama-use-system-llama.cpp.patch BuildRequires: go-vendor-tools BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: llama-cpp-devel %if %{with systemd} BuildRequires: systemd-rpm-macros %endif Requires: llama-cpp Obsoletes: ollama-base < 0.30.0 Obsoletes: ollama-rocm < 0.30.0 Obsoletes: ollama-vulkan < 0.30.0 %if %{with systemd} %{?systemd_requires} %endif %description Get up and running with OpenAI gpt-oss, DeepSeek-R1, Gemma 3 and other models. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 # Rename README's mv app/README.md app-README.md mv integration/README.md integration-README.md mv llama/README.md llama-README.md # web-search ollama plugins are not working well # Here is what they do https://docs.ollama.com/capabilities/web-search # disable # # For openclaw.go # if ensureWebSearchPlugin() { # registerWebSearchPlugin() # } sed -i '/if ensureWebSearchPlugin()/,+2d' cmd/launch/openclaw.go # # For pi.go sed -i '/ensurePiWebSearchPackage(bin)/d' cmd/launch/pi.go # sqlite3-binding.c:123934:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] sed -i 's@zTail = strrchr@zTail = (char \*)strrchr@' vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %cmake %cmake_build %global gomodulesmode GO111MODULE=on # Debug with: # Manual build when there are problems # export GOPATH=$(pwd)/_build:%{gopath} # export GO111MODULE=off # go build -o %{gobuilddir}/bin/ollama %{goipath} # Release with # cmake sets LDFLAGS env, this confuses gobuild export LDFLAGS= export GO_LDFLAGS="-X=github.com/ollama/ollama/version.Version=%{version} -X=github.com/ollama/ollama/server.mode=release" %gobuild -o %{gobuilddir}/bin/ollama %{goipath} %install mkdir -p %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/ollama %{buildroot}%{_bindir} rm -rf %{buildroot}%{_bindir}/*.so %if %{with systemd} install -p -D -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/ollama.service install -p -D -m 0644 %{SOURCE11} %{buildroot}%{_sysusersdir}/ollama.conf # home dir mkdir -p %{buildroot}%{_var}/lib/ollama %endif %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # symlink system llama-server mkdir -p %{buildroot}%{_prefix}/lib/ollama pushd %{buildroot}%{_prefix}/lib/ollama ln -s ../../bin/llama-server llama-server popd %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %if %{with systemd} %preun %systemd_preun ollama.service %post %systemd_post ollama.service %postun %systemd_postun_with_restart ollama.service %endif %files -f %{go_vendor_license_filelist} %doc README.md %license vendor/modules.txt %doc CONTRIBUTING.md SECURITY.md README.md app-README.md integration-README.md %doc llama-README.md %{_bindir}/ollama %{_prefix}/lib/ollama/llama-server %if %{with systemd} %attr(0755,ollama,ollama) %dir %{_var}/lib/ollama/ %{_unitdir}/ollama.service %{_sysusersdir}/ollama.conf %endif %changelog ## START: Generated by rpmautospec * Tue Sep 01 2026 Tom Rix - 0.33.1-1 - Update to 0.33.1 * Tue Aug 18 2026 Tom Rix - 0.32.8-1 - Update to 0.32.8 * Thu Jul 16 2026 Fedora Release Engineering - 0.24.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Sun Jul 12 2026 Tom Rix - 0.24.0-3 - Need to use the patch * Sun Jul 12 2026 Tom Rix - 0.24.0-2 - Make the download and upload tunable by enviromental variables. * Sat Jul 04 2026 Tom Rix - 0.24.0-1 - Update to 0.24.0 * Thu Jun 11 2026 Tom Rix - 0.23.4-3 - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec