Search
j0ke.net Open Build Service
>
Projects
>
server:dns
>
pdns-recursor
> pdns-recursor.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pdns-recursor.spec of Package pdns-recursor
# # spec file for package pdns-recursor # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild %{?!rhel:%define rhel 0} %if 0%{?rhel} == 5 %define hardening no %else %define hardening yes %endif Version: 4.1.16 Name: pdns-recursor Release: 105 %define pkg_version %{version} # Group: Productivity/Networking/DNS/Servers License: GPL v2 or later # %define home %{_var}/lib/pdns %define _localstatedir %{_var}/run/pdns BuildRequires: boost-devel gcc-c++ openssl-devel %if %{!?_without_lua:1}%{?_without_lua:0} BuildRequires: lua-devel >= 5.1 Requires: lua >= 5.1 %if 0%{?suse_version} %define lua_libs_config LUA_LIBS_CONFIG=-llua %define cxx_boost CXXFLAGS=-I./boost_1_39_0/ %else %define lua_libs_config LUA_LIBS_CONFIG=-llua-5.1 %define cxx_boost CXXFLAGS=-I./boost_1_39_0/ %endif %endif %if 0%{?suse_version} BuildRequires: pwdutils Requires: pwdutils %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} >= 1210 || 0%{?sles_version} >= 12 || 0%{?rhel} >= 7 BuildRequires: systemd %{?systemd_requires} %define has_systemd 1 %endif %if 0%{?suse_version} PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd %endif # Url: http://www.powerdns.com/ Source: http://downloads.powerdns.com/releases/%{name}-%{pkg_version}.tar.bz2 Source1: pdns-recursor.init Source2: recursor.conf Source3: boost_1_39_0.tar.bz2 Source4: pdns-recursor.cron Patch1: pdns-recursor-3.7.0-disable-secpoll.patch #Patch2: pdns-recursor-init-rh.patch # Summary: Modern, advanced and high performance recursing/non authoritative nameserver Provides: powerdns-recursor %description PowerDNS Recursor is a non authoritative/recursing DNS server. Use this package if you need a dns cache for your network. Authors: -------- http://www.powerdns.com %prep %setup -n %{name}-%{pkg_version} -a 3 %patch1 -p2 -b .disable-secpoll ##patch2 %build export HARDENING=%{hardening} %{cxx_boost} %configure --sysconfdir=/etc/pdns --localstatedir=/var/run/pdns %{cxx_boost} %__make clean %if %{!?_without_lua:1}%{?_without_lua:0} %{cxx_boost} LUA=1 LUA_CPPFLAGS_CONFIG= %{lua_libs_config} OPTFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" %__make SYSCONFDIR="%{_sysconfdir}/pdns" BINDIR="%{_sbindir}" STRIP_BINARIES=0 all %else CXXFLAGS=-I./boost_1_39_0/ OPTFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" %__make SYSCONFDIR="%{_sysconfdir}/pdns" BINDIR="%{_sbindir}" STRIP_BINARIES=0 all %endif %install %{__install} -Dd -m 0755 %{buildroot}{%{home},%{_localstatedir}} STRIP_BINARIES=0 %__make DESTDIR=%{buildroot} install SYSCONFDIR="%{_sysconfdir}/pdns" BINDIR="%{_sbindir}" %{__install} -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/pdns/recursor.conf %if 0%{?has_systemd} %{__install} -D -m 0644 contrib/systemd-pdns-recursor.service %{buildroot}%{_unitdir}/pdns-recursor.service rm -rf %{buildroot}%{_sysconfdir}/init.d/%{name} %else %if 0%{?suse_version} %{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name} %else %{__install} -D -m 0755 pdns-recursor.init.d %{buildroot}%{_sysconfdir}/init.d/%{name} %endif %{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} %endif %{__install} -m 0755 -d %{buildroot}%{_datadir}/%{name} cp -R rrd %{buildroot}%{_datadir}/%{name}/ %{__install} -d %{buildroot}%{_sysconfdir}/cron.d/ %{__install} -p %{SOURCE4} %{buildroot}%{_sysconfdir}/cron.d/%{name} %clean %{__rm} -rf %{buildroot} %pre /usr/sbin/groupadd -r pdns &>/dev/null || : /usr/sbin/useradd -o -g pdns -s /bin/false -r -c "pdns" -d %{home} pdns &>/dev/null || : %if 0%{?has_systemd} %service_add_pre pdns-recursor.service %endif %post %if 0%{?suse_version} %{fillup_and_insserv pdns-recursor} %endif %if 0%{?has_systemd} %service_add_post pdns-recursor.service %endif if [ "$1" == "1" ]; then cd %{_datadir}/%{name}/rrd ./create >/dev/null 2>&1 || : fi %preun %if 0%{?suse_version} %stop_on_removal pdns-recursor %endif %if 0%{?has_systemd} %service_del_preun pdns-recursor.service %endif %postun %if 0%{?suse_version} %restart_on_update pdns-recursor %insserv_cleanup %endif %if 0%{?has_systemd} %service_del_postun pdns-recursor.service %endif %files %defattr (-,root,root,-) %dir %{_sysconfdir}/pdns/ %config(noreplace) %{_sysconfdir}/pdns/recursor.conf %config %{_sysconfdir}/pdns/recursor.conf-dist %config %attr(644,root,root) %{_sysconfdir}/cron.d/%{name} %if 0%{?has_systemd} %{_unitdir}/pdns-recursor.service %else %{_sysconfdir}/init.d/%{name} %{_sbindir}/rcpdns-recursor %endif %{_sbindir}/pdns_recursor %{_sbindir}/rec_control %{_mandir}/man1/pdns_recursor.1* %{_mandir}/man1/rec_control.1* %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/rrd %{_datadir}/%{name}/rrd/update %{_datadir}/%{name}/rrd/create %{_datadir}/%{name}/rrd/makegraphs %{_datadir}/%{name}/rrd/index.html %doc README COPYING %dir %{home} %dir %{_localstatedir} %changelog