2 Version: %{getenv:BUILDER_RPM_VERSION}
3 Release: %{getenv:BUILDER_RPM_RELEASE}%{?dist}
4 Summary: Modern
, advanced and high performance recursing
/non authoritative name server
5 Group: System Environment
/Daemons
7 URL: https
://powerdns.com
8 Source0: %{name}-%{getenv:BUILDER_VERSION}.tar.bz2
10 Provides: powerdns
-recursor
= %{version}-%{release}
13 BuildRequires
: boost169
-devel
15 BuildRequires
: boost
-devel
17 BuildRequires
: libcap
-devel
18 BuildRequires
: systemd
19 BuildRequires
: systemd
-devel
20 BuildRequires
: openssl
-devel
21 BuildRequires
: net
-snmp
-devel
22 BuildRequires
: libsodium
-devel
23 BuildRequires
: fstrm
-devel
24 BuildRequires
: libcurl
-devel
27 BuildRequires
: lua
-devel
28 %define lua_implementation lua
30 BuildRequires
: luajit
-devel
31 %define lua_implementation luajit
35 BuildRequires
: libatomic
38 Requires(pre
): shadow
-utils
42 PowerDNS Recursor is a non authoritative
/recursing DNS server. Use this
43 package
if you need a dns cache
for your network.
47 %autosetup -p1
-n
%{name}-%{getenv:BUILDER_VERSION}
51 export CPPFLAGS
=-I
/usr
/include
/boost169
52 export LDFLAGS
=-L
/usr
/lib64
/boost169
56 --enable-option
-checking
=fatal \
57 --sysconfdir
=%{_sysconfdir}/%{name} \
60 --disable
-silent
-rules \
63 --enable-dns
-over
-tls \
66 --with
-lua
=%{lua_implementation} \
67 --enable-systemd
--with
-systemd
=%{_unitdir}
72 make %{?_smp_mflags} check ||
(cat
test-suite.log
&& false
)
75 make install DESTDIR
=%{buildroot}
77 %{__mv} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf{-dist,}
78 %{__mkdir} %{buildroot}%{_sysconfdir}/%{name}/recursor.d
80 # change user and group to pdns-recursor and add default include-dir
82 -e 's
/# setuid=/setuid=pdns-recursor/' \
83 -e 's
/# setgid=/setgid=pdns-recursor/' \
84 -e 's
!# include-dir=.*!&\ninclude-dir=%{_sysconfdir}/%{name}/recursor.d!' \
85 %{buildroot}%{_sysconfdir}/%{name}/recursor.conf
87 # The EL7 and 8 systemd actually supports %t, but its version number is older than that, so we do use seperate runtime dirs, but don't rely on RUNTIME_DIRECTORY
89 sed
-e 's
!/pdns_recursor
!& --socket
-dir
=%t/pdns
-recursor
!'
-i
%{buildroot}/%{_unitdir}/pdns
-recursor.service
91 sed
-e 's
!/pdns_recursor
!& --socket
-dir
=%t/pdns
-recursor
-%i!'
-e 's
!RuntimeDirectory
=pdns
-recursor
!&-%i!'
-i
%{buildroot}/%{_unitdir}/pdns
-recursor@.service
96 getent group pdns
-recursor
> /dev
/null || groupadd
-r pdns
-recursor
97 getent passwd pdns
-recursor
> /dev
/null || \
98 useradd
-r
-g pdns
-recursor
-d
/ -s
/sbin
/nologin \
99 -c "PowerDNS Recursor user" pdns
-recursor
103 systemctl daemon
-reload ||
:
104 %systemd_post %{name}.service
107 %systemd_preun %{name}.service
110 %systemd_postun_with_restart pdns
-recursor.service
113 %{_bindir}/rec_control
114 %{_sbindir}/pdns_recursor
115 %{_mandir}/man1
/pdns_recursor
.1.gz
116 %{_mandir}/man1
/rec_control
.1.gz
117 %{_unitdir}/pdns
-recursor.service
118 %{_unitdir}/pdns
-recursor@.service
119 %dir %{_sysconfdir}/%{name}
120 %dir %{_sysconfdir}/%{name}/recursor.d
121 %config(noreplace
) %{_sysconfdir}/%{name}/recursor.conf