blob: 8f24addd7ef881a193f2d43d123a48ba9ed31e65 (
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
43
44
45
46
47
48
49
|
%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
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
#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 # 替换为你的编译命令
%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}/
%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
|