mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-07-19 03:11:41 +02:00
Add Github Action to build RPM (#14)
* Update SPEC file * Add clean target to Makefile * add rpmbuild action * Add missing build dependency * Fix package name of golang for CentOS8 * Change outputs * Fix file list and build requires * Fix for file list * Also upload SRPM
This commit is contained in:
@@ -6,12 +6,14 @@ Summary: Metric collection daemon from the ClusterCockpit suite
|
||||
License: MIT
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: golang
|
||||
BuildRequires: go-toolset
|
||||
# for internal LIKWID installation
|
||||
BuildRequires: wget perl-Data-Dumper
|
||||
|
||||
Provides: %{name} = %{version}
|
||||
|
||||
%description
|
||||
A simple web app
|
||||
Metric collection daemon from the ClusterCockpit suite
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
@@ -20,15 +22,15 @@ A simple web app
|
||||
|
||||
|
||||
%build
|
||||
cd collectors
|
||||
make
|
||||
go build -v -o %{name}
|
||||
|
||||
|
||||
%install
|
||||
install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||
install -Dpm 0755 config.json %{buildroot}%{_sysconfdir}/%{name}/config.json
|
||||
install -Dpm 0755 %{name} %{buildroot}%{_sbindir}/%{name}
|
||||
install -Dpm 0600 config.json %{buildroot}%{_sysconfdir}/%{name}/%{name}.json
|
||||
install -Dpm 644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -Dpm 600 scripts/%{name}.config %{buildroot}%{_sysconfdir}/default/%{name}
|
||||
|
||||
|
||||
%check
|
||||
# go test should be here... :)
|
||||
@@ -41,9 +43,10 @@ install -Dpm 644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
||||
|
||||
%files
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%{_bindir}/%{name}
|
||||
%{_sbindir}/%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/config.json
|
||||
%{_sysconfdir}/default/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.json
|
||||
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user