diff options
Diffstat (limited to 'osmind-ai.spec')
| -rw-r--r-- | osmind-ai.spec | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/osmind-ai.spec b/osmind-ai.spec index 818a93a..f235381 100644 --- a/osmind-ai.spec +++ b/osmind-ai.spec @@ -1,6 +1,13 @@ %define dist_tag %(sed -n 's/.*release \\([0-9]*\\)\.\\([0-9]*\\).*[Ss][Pp]\\([0-9]*\\).*/oe\\1\\2sp\\3/p; t; s/.*release \\([0-9]*\\)\.\\([0-9]*\\).*/oe\\1\\2/p' /etc/openEuler-release) %global _unitdir /usr/lib/systemd/system +%ifarch x86_64 +%global go_arch amd64 +%endif +%ifarch aarch64 +%global go_arch arm64 +%endif + Name: osmind-ai Version: 1.0.0 Release: 1.%{?dist_tag} @@ -23,10 +30,9 @@ OSMind AI Service packaged as RPM. %setup -q %build -#export https_proxy=http://185.239.85.89:3128 -#export http_proxy=http://185.239.85.89:3128 -#go mod tidy -#go build -o osmind_agent cmd/einoagent/main.go # 替换为你的编译命令 +export GOPROXY=https://goproxy.cn,direct +go mod tidy +CGO_ENABLED=0 GOOS=linux GOARCH=%{go_arch} go build -o osmind_agent cmd/einoagent/main.go %install # 创建目录 @@ -34,7 +40,7 @@ install -d -m 755 %{buildroot}/opt/osmind_ai install -d -m 755 %{buildroot}%{_unitdir} # 复制二进制文件 -install -m 755 agent/%{_arch}/osmind_agent %{buildroot}/opt/osmind_ai/ +install -m 755 osmind_agent %{buildroot}/opt/osmind_ai/ # 复制 systemd 服务文件 install -m 644 osmind-ai.service %{buildroot}%{_unitdir}/ |
