Package init
(cherry picked from commit 38732602177151754152137ad3ab2568c98cee4a)
This commit is contained in:
parent
ff5f267509
commit
14bee1378e
BIN
PilotGo-2.0.1.tar.gz
Normal file
BIN
PilotGo-2.0.1.tar.gz
Normal file
Binary file not shown.
BIN
PilotGo-web.tar.gz
Normal file
BIN
PilotGo-web.tar.gz
Normal file
Binary file not shown.
94
PilotGo.spec
Executable file
94
PilotGo.spec
Executable file
@ -0,0 +1,94 @@
|
|||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
Name: PilotGo
|
||||||
|
Version: 2.0.1
|
||||||
|
Release: 1
|
||||||
|
Summary: PilotGo is a plugable operation platform written in go
|
||||||
|
License: MulanPSL-2.0
|
||||||
|
URL: https://gitee.com/openeuler/PilotGo
|
||||||
|
Source0: https://gitee.com/openeuler/PilotGo/%{name}-%{version}.tar.gz
|
||||||
|
# Web packaged from ace055a5584482443e9fcfcca906cff2949f6c9b
|
||||||
|
Source1: PilotGo-web.tar.gz
|
||||||
|
BuildRequires: systemd
|
||||||
|
BuildRequires: golang
|
||||||
|
|
||||||
|
%description
|
||||||
|
PilotGo is a plugable operation platform written in go.
|
||||||
|
|
||||||
|
%package server
|
||||||
|
Summary: PilotGo server
|
||||||
|
Provides: pilotgo-server = %{version}-%{release}
|
||||||
|
|
||||||
|
%description server
|
||||||
|
PilotGo server.
|
||||||
|
|
||||||
|
%package agent
|
||||||
|
Summary: PilotGo agent
|
||||||
|
Provides: pilotgo-agent = %{version}-%{release}
|
||||||
|
|
||||||
|
%description agent
|
||||||
|
PilotGo agent.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{name}-%{version}
|
||||||
|
tar -xzvf %{SOURCE1}
|
||||||
|
|
||||||
|
%build
|
||||||
|
# server
|
||||||
|
GO111MODULE=on go build -mod=vendor -o PilotGo-server pkg/app/server/main.go
|
||||||
|
# agent
|
||||||
|
GO111MODULE=on go build -mod=vendor -o PilotGo-agent pkg/app/agent/main.go
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/opt/PilotGo/{server/{frontend,log},agent/log}
|
||||||
|
# server
|
||||||
|
install -D -m 0755 PilotGo-server %{buildroot}/opt/PilotGo/server
|
||||||
|
install -D -m 0644 config_server.yaml.templete %{buildroot}/opt/PilotGo/server/config_server.yaml
|
||||||
|
install -D -m 0644 scripts/service/PilotGo-server.service %{buildroot}%{_unitdir}/PilotGo-server.service
|
||||||
|
cp -rf frontend/dist %{buildroot}/opt/PilotGo/server/frontend
|
||||||
|
# agent
|
||||||
|
install -D -m 0755 PilotGo-agent %{buildroot}/opt/PilotGo/agent
|
||||||
|
install -D -m 0644 config_agent.yaml.templete %{buildroot}/opt/PilotGo/agent/config_agent.yaml
|
||||||
|
install -D -m 0644 scripts/service/PilotGo-agent.service %{buildroot}%{_unitdir}/PilotGo-agent.service
|
||||||
|
|
||||||
|
%post server
|
||||||
|
%systemd_post PilotGo-server.service
|
||||||
|
|
||||||
|
%preun server
|
||||||
|
%systemd_preun PilotGo-server.service
|
||||||
|
|
||||||
|
%postun server
|
||||||
|
%systemd_postun PilotGo-server.service
|
||||||
|
|
||||||
|
%post agent
|
||||||
|
%systemd_post PilotGo-agent.service
|
||||||
|
|
||||||
|
%preun agent
|
||||||
|
%systemd_preun PilotGo-agent.service
|
||||||
|
|
||||||
|
%postun agent
|
||||||
|
%systemd_postun PilotGo-agent.service
|
||||||
|
|
||||||
|
%files server
|
||||||
|
%dir /opt/PilotGo
|
||||||
|
%dir /opt/PilotGo/server
|
||||||
|
%dir /opt/PilotGo/server/log
|
||||||
|
/opt/PilotGo/server/PilotGo-server
|
||||||
|
/opt/PilotGo/server/config_server.yaml
|
||||||
|
%dir /opt/PilotGo/server/frontend
|
||||||
|
/opt/PilotGo/server/frontend/dist
|
||||||
|
%{_unitdir}/PilotGo-server.service
|
||||||
|
|
||||||
|
%files agent
|
||||||
|
%dir /opt/PilotGo
|
||||||
|
%dir /opt/PilotGo/agent
|
||||||
|
%dir /opt/PilotGo/agent/log
|
||||||
|
/opt/PilotGo/agent/PilotGo-agent
|
||||||
|
/opt/PilotGo/agent/config_agent.yaml
|
||||||
|
%{_unitdir}/PilotGo-agent.service
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Sep 01 2023 jianxinyu <jiangxinyu@kylinos.cn> - 2.0.1-1
|
||||||
|
- Package init
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user