-
Notifications
You must be signed in to change notification settings - Fork 9
/
dhcpdoctor.spec
38 lines (30 loc) · 1.08 KB
/
dhcpdoctor.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
%global srcname dhcpdoctor
%define version _VERSION_
%define icingadest /etc/icinga2/conf.d/check_commands
Name: dhcpdoctor
Version: %{version}
Release: 1%{?dist}
Summary: Tool for testing IPv4 and IPv6 DHCP services
License: MIT
URL: https://github.com/ArnesSI/dhcpdoctor
Source0: dist/%{srcname}-%{version}.tar.gz
Source1: dhcpdoctor.conf
BuildRequires: python34-devel
BuildRequires: python34-pip
%description
dhcpdoctor sends DHCP requests and checks if it gets an offer from DHCP server.
It supports BOOTP+DHCP for IPv4 and DHCPv6 for IPv6.
It can operate as a DHCP client by sending requests on the local network via
broadcast/multicast or as a DHCP client and relay in one tool by unicasting
requests to the specified IP address.
%prep
%autosetup -n %{srcname}-%{version}
%build
pyinstaller --onefile dhcpdoctor/dhcpdoctor.py -n dhcpdoctor
%install
install -p -D -m 4755 dist/dhcpdoctor %{buildroot}%{_bindir}/dhcpdoctor
install -p -D -m 0644 %_sourcedir/dhcpdoctor.conf %{buildroot}%{icingadest}/dhcpdoctor.conf
%files
%defattr(-,root,root,-)
%{_bindir}/dhcpdoctor
%{icingadest}/dhcpdoctor.conf