summaryrefslogtreecommitdiff
path: root/ollama.spec
diff options
context:
space:
mode:
Diffstat (limited to 'ollama.spec')
-rw-r--r--ollama.spec32
1 files changed, 27 insertions, 5 deletions
diff --git a/ollama.spec b/ollama.spec
index f343d5c..99920f9 100644
--- a/ollama.spec
+++ b/ollama.spec
@@ -1,22 +1,25 @@
%global debug_package %{nil}
Name: ollama
-Version: 0.3.0
+Version: 0.3.6
Release: 1%{?dist}
Summary: Get up and running with Llama 3, Mistral, Gemma 2, and other large language models.
License: MIT
URL: https://ollama.com
Source0: https://github.com/ollama/ollama/archive/refs/tags/v%{version}.tar.gz
# ollma references a specific commit of llama.cpp as a submodule through git.
-Source1: https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3440.tar.gz
+Source1: https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3536.tar.gz
Source2: vendor.tar.gz
-Source3: ollama.service
+Source3: %{name}.service
+Source4: %{name}-ui.service
+Source5: https://github.com/ollama-ui/ollama-ui/archive/refs/heads/main.tar.gz
BuildRequires: cmake
BuildRequires: golang
BuildRequires: gcc-c++
BuildRequires: git
+Requires: python3
%description
Ollama is a relatively new but powerful framework designed for
@@ -47,6 +50,8 @@ git config user.name "tmp"
git add .
git commit -a -s -m 'init'
cd ../../
+tar -xzf %{SOURCE5}
+mv ollama-ui-main ollama-ui
%build
@@ -75,9 +80,11 @@ go build .
%install
-mkdir -p %{buildroot}%{_bindir}
-install -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
+install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
+install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-ui.service
+mkdir -p %{buildroot}%{_datadir}/%{name}/
+cp -r %{name}-ui/ %{buildroot}%{_datadir}/%{name}/
%post
@@ -101,14 +108,20 @@ echo "Adding current user to ollama group..."
echo "Creating ollama systemd service..."
%systemd_post %{name}.service
+%systemd_post %{name}-ui.service
+
+chown ollama /usr/share/ollama
%preun
%systemd_preun %{name}.service
+%systemd_preun %{name}-ui.service
%postun
%systemd_postun %{name}.service
+%systemd_postun %{name}-ui.service
+
echo "Deleting ollama user..."
userdel ollama
echo "Deleting ollama group..."
@@ -120,9 +133,18 @@ groupdel ollama
%doc README.md
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
+%{_unitdir}/%{name}-ui.service
+%{_datadir}/%{name}/%{name}-ui
%changelog
+* Tue Aug 20 2024 Xenochou <xenochou@qq.com> - 0.3.6-1
+- Update ollama to 0.3.6
+- Add ollama-ui
+
+* Sat Jul 27 2024 Xenochou <xenochou@qq.com> - 0.3.4-1
+- Update ollama to 0.3.4
+
* Sat Jul 27 2024 Xenochou <xenochou@qq.com> - 0.3.0-1
- Update ollama to 0.3.0