forked from NDPF/dcache-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dcache_exporter.spec
48 lines (39 loc) · 1.27 KB
/
dcache_exporter.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
Summary: Prometheus exporter for dcache metrics
Name: dcache_exporter
Version: %{_version}
Release: 2
License: GPLv3
Source0: %{_source}
Requires: python2-prometheus_client
BuildArch: noarch
%{?systemd_requires}
%description
Prometheus exporter for dcache metrics
%prep
%setup -q -n %{name}-%{version}
%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/etc/default
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
cp dcache_exporter $RPM_BUILD_ROOT/usr/bin
chmod 755 $RPM_BUILD_ROOT/usr/bin/dcache_exporter
cp dcache_exporter.default $RPM_BUILD_ROOT/etc/default/dcache_exporter
cp dcache_exporter.service $RPM_BUILD_ROOT/lib/systemd/system
%post
%systemd_post dcache_exporter.service
%preun
%systemd_preun dcache_exporter.service
%postun
%systemd_postun_with_restart dcache_exporter.service
%files
%defattr(-,root,root,-)
%attr(755, root, root) %{_bindir}/dcache_exporter
/lib/systemd/system/dcache_exporter.service
%config /etc/default/dcache_exporter
%changelog
* Fri May 03 2019 Andrew Pickford <[email protected]> - 0.5-1
Add service restarts and stops on package update and removal
Follow prometheus best practices and prepend dcache metrics with dcache_
Add requirements to spec file
* Wed Oct 25 2017 Andrew Pickford <[email protected]> - 0.1-1
- Initial RPM release