summaryrefslogtreecommitdiff
path: root/osmind-ai.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-11-06 04:00:37 +0000
committerCoprDistGit <infra@openeuler.org>2025-11-06 04:00:37 +0000
commit1086d9c9961bbef389b25cca09e9557818372fc7 (patch)
tree17b35e9ee83f010371480c26e070f327e791dff9 /osmind-ai.spec
parentada3e369ecc99382a5c983f2a833955e2f5b4701 (diff)
automatic import of osmind-aiopeneuler24.03_LTS_SP1
Diffstat (limited to 'osmind-ai.spec')
-rw-r--r--osmind-ai.spec16
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}/