]> git.pld-linux.org Git - SPECS.git/blob - pdns-recursor.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / pdns-recursor.spec
1 Summary:        Modern, advanced and high performance recursing/non authoritative nameserver
2 Summary(pl.UTF-8):      Nowoczesny i zaawansowany buforujący serwer DNS o wysokiej wydajności
3 Name:           pdns-recursor
4 Version:        3.6.0
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
9 # Source0-md5:  95f21e6d64c1332aeca9fa3f786dd0a2
10 Source1:        %{name}.init
11 URL:            http://www.powerdns.com/
12 BuildRequires:  boost-devel
13 Requires(post): sed >= 4.0
14 Requires(post,preun):   /sbin/chkconfig
15 Requires(post,preun,postun):    systemd-units
16 Requires(postun):       /usr/sbin/groupdel
17 Requires(postun):       /usr/sbin/userdel
18 Requires(pre):  /bin/id
19 Requires(pre):  /usr/bin/getgid
20 Requires(pre):  /usr/sbin/groupadd
21 Requires(pre):  /usr/sbin/useradd
22 Requires:       rc-scripts
23 Requires:       systemd-units
24 Provides:       group(djbdns)
25 Provides:       nameserver
26 Provides:       user(pdns-recursor)
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 PowerDNS Recursor is a high performance non authoritative/recursing
31 DNS server.
32
33 %description -l pl.UTF-8
34 PowerDNS Recursor jest wysokowydajnym buforującym serwerem DNS.
35
36 %prep
37 %setup -q
38
39 %build
40 %{__make} \
41         BINDIR="%{_bindir}" \
42         SBINDIR="%{_sbindir}" \
43         SYSCONFDIR="%{_sysconfdir}/%{name}" \
44         CC="%{__cc}" \
45         CXX="%{__cxx}" \
46         OPTFLAGS="%{rpmcxxflags}" \
47         LDFLAGS="%{rpmldflags} -pthread"
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51
52 %{__make} install \
53         BINDIR="%{_bindir}" \
54         SBINDIR="%{_sbindir}" \
55         SYSCONFDIR="%{_sysconfdir}/%{name}" \
56         DESTDIR=$RPM_BUILD_ROOT
57
58 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/init.d
59 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
60 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
61 install -d $RPM_BUILD_ROOT%{systemdunitdir}
62 install contrib/systemd-pdns-recursor.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
63 mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/recursor.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/recursor.conf
64 sed -i 's/^# setgid=$/setgid=djbdns/g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/recursor.conf
65 sed -i 's/^# setuid=$/setuid=pdns-recursor/g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/recursor.conf
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %pre
71 %groupadd -g 32 djbdns
72 %useradd -u 68 -d /usr/share/empty -s /bin/false -c "PowerDNS Resolver User" -g djbdns pdns-recursor
73
74 %post
75 /sbin/chkconfig --add pdns-recursor
76 %service pdns-recursor restart
77 %systemd_post %{name}.service
78
79 %preun
80 if [ "$1" = "0" ]; then
81         %service pdns-recursor stop
82         /sbin/chkconfig --del pdns-recursor
83 fi
84 %systemd_preun %{name}.service
85
86 %postun
87 if [ "$1" = "0" ]; then
88         %userremove pdns-recursor
89         %groupremove djbdns
90 fi
91 %systemd_reload
92
93 %files
94 %defattr(644,root,root,755)
95 %doc README
96 %attr(754,root,root) /etc/rc.d/init.d/%{name}
97 %attr(644,root,root) %{systemdunitdir}/%{name}.service
98 %dir %{_sysconfdir}/%{name}
99 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/recursor.conf
100 %attr(755,root,root) %{_sbindir}/*
101 %attr(755,root,root) %{_bindir}/*
102 %{_mandir}/man1/*
This page took 0.166666 seconds and 3 git commands to generate.