-
Notifications
You must be signed in to change notification settings - Fork 1
/
run-nagios-passive-check-and-submit.spec
41 lines (32 loc) · 1.2 KB
/
run-nagios-passive-check-and-submit.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
%define name run-nagios-passive-check-and-submit
%define version 0.1.5
%define release 1%{?dist}
Summary: Run a Nagios passive check and submit its result via the Nagios CGI
Name: %{name}
Version: %{version}
Release: %{release}
Source0: https://github.com/neingeist/%{name}/archive/%{version}.tar.gz
License: UNKNOWN
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Mike Gerber <[email protected]>
BuildRequires: python3-devel
Requires: %{py3_dist beautifulsoup4 lxml requests termcolor}
Requires: python-yaml
%description
Run a Nagios passive check and submit its result via the Nagios CGI.
%prep
%setup -n %{name}-%{version} -n %{name}-%{version}
%build
python setup.py build
%install
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
# Fedora does not like an unversioned python shebang:
sed -i 's%#!/usr/bin/python$%#!/usr/bin/python3%' $RPM_BUILD_ROOT/%{_bindir}/run-nagios-passive-check-and-submit
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%{python3_sitelib}/run_nagios_passive_check_and_submit-%{version}-py?.?.egg-info/