-
Notifications
You must be signed in to change notification settings - Fork 17
/
mdns-reflector.spec
72 lines (53 loc) · 1.7 KB
/
mdns-reflector.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
Name: mdns-reflector
Version: 0.0.1
Release: 0.dev.1%{?dist}
Summary: lightweight and performant multicast DNS (mDNS) reflector
License: GPLv3+
URL: https://github.com/vfreex/mdns-reflector
Source0: %{name}-%{version}.tar.gz
BuildRequires: systemd
BuildRequires: gcc
BuildRequires: make
%if 0%{?rhel} == 7
BuildRequires: cmake3
%global cmake %{cmake3}
%global cmake_build %{cmake3_build}
%global cmake_install %{cmake3_install}
%else
BuildRequires: cmake
%endif
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
mDNS Reflector (mdns-reflector) is a lightweight and performant multicast DNS (mDNS) reflector with a modern design.
It reflects mDNS queries and responses among multiple LANs, which allows you to run untrusted IoT devices
in a separate LAN but those devices can still be discovered in other LANs.
mDNS Reflector supports zone based reflection and IPv6.
%prep
%setup -q
%build
%cmake .
%cmake_build
%install
%cmake_install
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install misc/mdns-reflector $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mdns-reflector
install -d $RPM_BUILD_ROOT%{_unitdir}
install -t $RPM_BUILD_ROOT%{_unitdir} misc/mdns-reflector.service
%files
%caps(cap_net_raw+ep) %{_bindir}/mdns-reflector
%config(noreplace) %{_sysconfdir}/sysconfig/mdns-reflector
%{_unitdir}/mdns-reflector.service
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc README.md
%post
%systemd_post mdns-reflector.service
%preun
%systemd_preun mdns-reflector.service
%postun
%systemd_postun_with_restart mdns-reflector.service
%changelog
* Wed Aug 18 2021 Yuxiang Zhu <[email protected]>
- Initial release