-
Notifications
You must be signed in to change notification settings - Fork 14
/
pcocc-agent.spec
56 lines (38 loc) · 934 Bytes
/
pcocc-agent.spec
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
50
51
52
53
54
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{_dbpath}/brp-compress
%{?systemd_requires}
BuildRequires: systemd
Summary: The pcocc guest agent
Name: pcocc-agent
Version: 0.4
Release: 1
License: GPL
Group: Development/Tools
SOURCE0 : %{name}-%{version}.tar.gz
URL: https://github.com/cea-hpc/pcocc/agent
BuildRoot: %{_tmppath}/%{name}-%{version}
%description
%{summary}
%prep
%setup -q
%build
go build .
%install
mkdir -p %{buildroot}/%{_sbindir}
install -m 0755 %{name} %{buildroot}/%{_sbindir}/%{name}
mkdir -p %{buildroot}/%{_unitdir}
install -m 0644 %{name}.service %{buildroot}/%{_unitdir}/%{name}.service
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_sbindir}/*
%{_unitdir}/*
%changelog
%post
%systemd_post pcocc-agent.service
%preun
%systemd_preun pcocc-agent.service
%postun
%systemd_postun_with_restart pcocc-agent.service