summaryrefslogtreecommitdiff
path: root/ollama.spec
blob: da52d2342bc650874d608c42b74db423f5664d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%global _empty_manifest_terminate_build 0
%global _unpackaged_files_terminate_build 0
Name:		ollama
Version:        0.2.5
Release:        1%{?dist}
Summary:        Get up and running with Llama 3, Mistral, Gemma 2, and other large language models.

License:        MIT license
URL:		https://github.com/ollama/%{name}
# Source0:        https://github.com/ollama/%{name}/archive/refs/tags/v%{version}.tar.gz

BuildRequires:	golang
BuildRequires:  cmake
BuildRequires:	gcc
BuildRequires:	g++
BuildRequires:  git

%description
Get up and running with Llama 3, Mistral, Gemma 2, and other large language models.

%prep
%setup -c -T
git clone https://gitee.com/mirrors/ollama.git

%build
cd ollama
sed -i 's|https://github.com/ggerganov/llama.cpp.git|https://gitee.com/cxunmz/llama.cpp.git|' .gitmodules
export GOPROXY=https://goproxy.cn
go generate ./...
go build .

%install
cd ollama
mkdir -p %{buildroot}%{_bindir}
install -m 0755 %{name} %{buildroot}%{_bindir}/%{name}

%files
%{_bindir}/ollama

%changelog
* Mon Jul 15 2024 Xenochou <xenochou@qq.com> - 1
- support ollama 0.2.5