65 lines
2.0 KiB
RPMSpec
65 lines
2.0 KiB
RPMSpec
%define debug_package %{nil}
|
|
|
|
Name: PilotGo-plugin-grafana
|
|
Version: 1.1.0
|
|
Release: 2
|
|
Summary: PilotGo grafana plugin maintains grafana to provide beautiful visual monitoring interface.
|
|
License: MulanPSL-2.0
|
|
URL: https://gitee.com/openeuler/PilotGo-plugin-grafana
|
|
Source0: https://gitee.com/openeuler/PilotGo-plugin-grafana/repository/archive/v%{version}.tar.gz
|
|
Patch0: Add-extention-of-grafana.patch
|
|
|
|
BuildRequires: systemd
|
|
BuildRequires: golang
|
|
Requires: grafana
|
|
Provides: pilotgo-plugin-grafana = %{version}-%{release}
|
|
|
|
%description
|
|
PilotGo grafana plugin maintains grafana to provide beautiful visual monitoring interface.
|
|
|
|
%prep
|
|
%setup -n %{name}-v%{version}
|
|
%patch 0 -p1
|
|
|
|
%build
|
|
GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-grafana main.go
|
|
|
|
%install
|
|
mkdir -p %{buildroot}/opt/PilotGo/plugin/grafana/log
|
|
install -D -m 0755 PilotGo-plugin-grafana %{buildroot}/opt/PilotGo/plugin/grafana
|
|
install -D -m 0644 config.yaml.templete %{buildroot}/opt/PilotGo/plugin/grafana/config.yaml
|
|
install -D -m 0644 scripts/PilotGo-plugin-grafana.service %{buildroot}%{_unitdir}/PilotGo-plugin-grafana.service
|
|
|
|
%post
|
|
%systemd_post PilotGo-plugin-grafana.service
|
|
|
|
%preun
|
|
%systemd_preun PilotGo-plugin-grafana.service
|
|
|
|
%postun
|
|
%systemd_postun PilotGo-plugin-grafana.service
|
|
if [ $1 -eq 0 ]; then
|
|
# Clear all installed files when uninstalling
|
|
rm -rf /opt/PilotGo/plugin/grafana
|
|
fi
|
|
|
|
%files
|
|
/opt/PilotGo/plugin/grafana/PilotGo-plugin-grafana
|
|
/opt/PilotGo/plugin/grafana/config.yaml
|
|
/opt/PilotGo/plugin/grafana/log
|
|
%{_unitdir}/PilotGo-plugin-grafana.service
|
|
|
|
%changelog
|
|
* Wed May 15 2024 jianxinyu <jiangxinyu@kylinos.cn> - 1.1.0-2
|
|
- Solve the problem of missing grafana extension
|
|
|
|
* Tue Apr 02 2024 jianxinyu <jiangxinyu@kylinos.cn> - 1.1.0-1
|
|
- Update package to version 1.1.0
|
|
|
|
* Wed Sep 13 2023 wubijie <wubijie@kylinos.cn> - 1.0.1-2
|
|
- Modify the README.md file
|
|
|
|
* Fri Sep 01 2023 jianxinyu <jiangxinyu@kylinos.cn> - 1.0.1-1
|
|
- Package init
|
|
|