-
Notifications
You must be signed in to change notification settings - Fork 25
/
prometheus-webhook-snmp.spec
74 lines (60 loc) · 2.05 KB
/
prometheus-webhook-snmp.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#
# spec file for package prometheus-webhook-snmp
#
# Copyright (c) 2019-2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: prometheus-webhook-snmp
Version: 1.5
Release: 0
Summary: Prometheus Alertmanager receiver for SNMP traps
License: GPL-3.0
Group: System/Management
Url: https://github.com/SUSE/prometheus-webhook-snmp
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-setuptools
Requires: python3-prometheus-client
Requires: python3-click
%if 0%{?suse_version}
Requires: python3-CherryPy
Requires: python3-PyYAML
%else
Requires: python3-cherrypy
Requires: python3-yaml
%endif
Requires: python3-dateutil
Requires: python3-pysnmp >= 4.4.1
%description
prometheus-webhook-snmp is a Prometheus Alertmanager receiver that
translates incoming notifications into SNMP traps.
%prep
%setup -n %{name}-%{version}
%build
%install
make install DESTDIR=%{buildroot} DOCDIR=%{_docdir} PYTHON3_SITELIB=%{python3_sitelib} UNITDIR=%{_unitdir}
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%dir %{python3_sitelib}/prometheus_webhook_snmp
%{python3_sitelib}/prometheus_webhook_snmp/__init__.py
%{python3_sitelib}/prometheus_webhook_snmp/utils.py
%{_unitdir}/%{name}.service
%changelog