%global debug_package %{nil} Name: ollama Version: 0.15.5 # Bump to 5 to force upgrade over the broken version Release: 5%{?dist} Summary: Get up and running with large language models locally License: MIT URL: https://github.com/ollama/ollama Source0: https://github.com/ollama/ollama/releases/download/v%{version}/ollama-linux-amd64.tar.zst BuildRequires: systemd-rpm-macros BuildRequires: tar BuildRequires: zstd Requires: systemd %description Get up and running with large language models locally. %prep %setup -q -c -n %{name}-%{version} %build # No build needed %install # 1. Install Binary to Standard Path (/usr/bin/ollama) mkdir -p %{buildroot}%{_bindir} install -m 755 bin/ollama %{buildroot}%{_bindir}/ollama # 2. Install Libs to Standard Path (/usr/lib/ollama) # The tarball contains lib/ollama/runners... # We copy lib/ollama into /usr/lib/ so it becomes /usr/lib/ollama mkdir -p %{buildroot}%{_libdir} cp -a lib/ollama %{buildroot}%{_libdir}/ # 3. Service File mkdir -p %{buildroot}%{_unitdir} cat > %{buildroot}%{_unitdir}/ollama.service </dev/null || groupadd -r ollama getent passwd ollama >/dev/null || \ useradd -r -g ollama -d /usr/share/ollama -s /sbin/nologin \ -c "Ollama Service User" ollama exit 0 %post %systemd_post ollama.service %preun %systemd_preun ollama.service %postun %systemd_postun_with_restart ollama.service %files %{_bindir}/ollama %{_libdir}/ollama %{_unitdir}/ollama.service %changelog * Wed Jan 28 2026 Robbware - 0.15.2-5 - Fixed directory structure to match official install paths (/usr/lib/ollama) * Fri Fev 6 2026 Robbware - 0.15.5-1 - Bumped to version 0.15.5