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 Source1: pdns
-recursor.init
13 Provides: powerdns
-recursor
= %{version}-%{release}
15 BuildRequires
: boost148
-devel
16 BuildRequires
: lua
-devel
18 BuildRequires
: boost
-devel
19 BuildRequires
: libcap
-devel
21 BuildRequires
: lua
-devel
22 %define lua_implementation lua
24 BuildRequires
: luajit
-devel
25 %define lua_implementation luajit
27 BuildRequires
: systemd
28 BuildRequires
: systemd
-devel
32 BuildRequires
: libatomic
36 BuildRequires
: protobuf
-compiler
37 BuildRequires
: protobuf
-devel
40 BuildRequires
: openssl
-devel
41 BuildRequires
: net
-snmp
-devel
42 BuildRequires
: libsodium
-devel
44 Requires(pre
): shadow
-utils
46 Requires(post
): /sbin
/chkconfig
47 Requires(preun
): /sbin
/service
, /sbin
/chkconfig
48 Requires(postun
): /sbin
/service
54 PowerDNS Recursor is a non authoritative
/recursing DNS server. Use this
55 package
if you need a dns cache
for your network.
60 %setup -n
%{name}-%{getenv:BUILDER_VERSION}
62 %autosetup -p1
-n
%{name}-%{getenv:BUILDER_VERSION}
67 --sysconfdir
=%{_sysconfdir}/%{name} \
70 --disable
-silent
-rules \
75 --with
-boost
=/usr
/include
/boost148 LIBRARY_PATH
=/usr
/lib64
/boost148
77 make %{?_smp_mflags} LIBRARY_PATH
=/usr
/lib64
/boost148
81 --with
-lua
=%{lua_implementation} \
82 --enable-systemd
--with
-systemd
=%{_unitdir}
88 make %{?_smp_mflags} check ||
(cat
test-suite.log
&& false
)
91 make install DESTDIR
=%{buildroot}
93 %{__mv} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf{-dist,}
96 %{__install} -D -p %{SOURCE1} %{buildroot}%{_initrddir}/pdns
-recursor
99 # change user and group to pdns-recursor
101 -e 's
/# setuid=/setuid=pdns-recursor/' \
102 -e 's
/# setgid=/setgid=pdns-recursor/' \
103 %{buildroot}%{_sysconfdir}/%{name}/recursor.conf
106 getent group pdns
-recursor
> /dev
/null || groupadd
-r pdns
-recursor
107 getent passwd pdns
-recursor
> /dev
/null || \
108 useradd
-r
-g pdns
-recursor
-d
/ -s
/sbin
/nologin \
109 -c "PowerDNS Recursor user" pdns
-recursor
114 chkconfig
--add
%{name}
116 %systemd_post %{name}.service
121 if [ $
1 -eq
0 ]; then
122 service
%{name} stop
>/dev
/null
2>&1 ||
:
123 chkconfig
--del
%{name}
126 %systemd_preun %{name}.service
131 if [ $
1 -ge
1 ]; then
132 service
%{name} condrestart
>/dev
/null
2>&1 ||
:
136 %systemd_postun_with_restart pdns
-recursor.service
140 %{_bindir}/rec_control
141 %{_sbindir}/pdns_recursor
142 %{_mandir}/man1
/pdns_recursor
.1.gz
143 %{_mandir}/man1
/rec_control
.1.gz
145 %{_initrddir}/pdns
-recursor
147 %{_unitdir}/pdns
-recursor.service
148 %{_unitdir}/pdns
-recursor@.service
150 %dir %{_sysconfdir}/%{name}
151 %config(noreplace
) %{_sysconfdir}/%{name}/recursor.conf