summaryrefslogtreecommitdiff
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
commit73a4d7b07610264a4a5e901722865dd7171ba640 (patch)
tree17b35e9ee83f010371480c26e070f327e791dff9
parent9cb12f06b5b3868194a2e10e23bee86d1b0661fe (diff)
automatic import of osmind-aiopeneuler24.03_LTS
-rw-r--r--osmind-ai.spec16
-rw-r--r--sources2
2 files changed, 12 insertions, 6 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}/
diff --git a/sources b/sources
index 6c9f462..ee24f35 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e422cb3beff5414f05e1b70aef6d9c76 osmind-ai-1.0.0.tar.gz
+28f51a818da8927e836da0d21c249e3b osmind-ai-1.0.0.tar.gz