summaryrefslogtreecommitdiff
path: root/osmind-ai.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-10-15 07:45:15 +0000
committerCoprDistGit <infra@openeuler.org>2025-10-15 07:45:15 +0000
commit523ed84a5d88430900dab6c2c2efc4020c7a0f8d (patch)
treedb4cc9bc115f4dca2383f868fc92df9624bbedae /osmind-ai.spec
parent10a0757b7a7bda3ca6169ae40738fddf2c45780f (diff)
automatic import of osmind-ai
Diffstat (limited to 'osmind-ai.spec')
-rw-r--r--osmind-ai.spec58
1 files changed, 58 insertions, 0 deletions
diff --git a/osmind-ai.spec b/osmind-ai.spec
new file mode 100644
index 0000000..c8e99eb
--- /dev/null
+++ b/osmind-ai.spec
@@ -0,0 +1,58 @@
+%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)
+
+Name: osmind-ai
+Version: 1.0.0
+Release: 1.%{?dist_tag}
+Summary: OSMind AI Service
+
+License: MulanPSL-2.0
+URL: https://gitee.com/Victeo/osmind-aiservice
+Source0: %{name}-%{version}.tar.gz
+
+%global debug_package %{nil}
+%global _enable_debug_package 0
+
+BuildRequires: golang
+Requires: systemd
+
+%description
+OSMind AI Service packaged as RPM.
+
+%prep
+%setup -q
+
+%build
+go mod tidy
+go build -o osmind_agent cmd/einoagent/main.go # 替换为你的编译命令
+
+%install
+# 创建目录
+install -d -m 755 %{buildroot}/opt/osmind_ai
+install -d -m 755 %{buildroot}%{_unitdir}
+
+# 复制二进制文件
+install -m 755 osmind_agent %{buildroot}/opt/osmind_ai/
+
+# 复制 systemd 服务文件
+install -m 644 osmind-ai.service %{buildroot}%{_unitdir}/
+
+%post
+# systemd 配置
+%systemd_post osmind-ai.service
+
+%preun
+# 卸载前停止服务
+%systemd_preun osmind-ai.service
+
+%postun
+# 清理配置
+%systemd_postun_with_restart osmind-ai.service
+
+%files
+%dir /opt/osmind_ai
+/opt/osmind_ai/osmind_agent
+%{_unitdir}/osmind-ai.service
+
+%changelog
+* Tue Sep 16 2025 ShiLei <845621916@qq.com> - 1.0.0-1
+- Initial package