LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File pdns-recursor.spec of Package pdns-recursor (Project server:dns)

# spec file for package pdns-recursor (Version
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

Name:           pdns-recursor
Version:        3.3
Release:        1
%define pkg_version    3.3
Group:          Productivity/Networking/DNS/Servers
License:        GPL-2.0+
%define home           %{_var}/lib/pdns
%define _localstatedir %{_var}/run/pdns
BuildRequires:  boost-devel gcc-c++
BuildRequires:  lua-devel
%define lua_lib lua
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %insserv_prereq %fillup_prereq pwdutils
Url:            http://www.powerdns.com/
Source:         http://downloads.powerdns.com/releases/%{name}-%{pkg_version}.tar.bz2
Source1:        pdns-recursor.init
Source2:        recursor.conf
Patch:          pdns-recursor-%{version}_config.patch
Patch1:         pdns-recursor-3.2rc1-strip.patch
Patch2:		pdns-rec-lua52.patch
Summary:        Modern, advanced and high performance recursing/non authoritative nameserver
PowerDNS Recursor is a non authoritative/recursing DNS server. Use this
package if you need a dns cache for your network.


%setup -n %{name}-%{pkg_version}

%{__make} OPTFLAGS="%{optflags} -fpic -DPIC" \
  LUA=1 LUA_LIBS_CONFIG="-pie -l%lua_lib" LUA_CPPFLAGS_CONFIG="-I/usr/include/lua5.1"

%{__install} -Dd -m 0755 %{buildroot}{%{home},%{_localstatedir}}
%makeinstall CONFIGDIR="%{_sysconfdir}/pdns" BINDIR="%{_sbindir}"
%{__install} -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/pdns/recursor.conf
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}

%{__rm} -rf %{buildroot}

/usr/sbin/groupadd -r pdns &>/dev/null || :
/usr/sbin/useradd -g pdns -s /bin/false -r -c "pdns" -d %{home} pdns &>/dev/null || :

%{fillup_and_insserv pdns-recursor}

%stop_on_removal pdns-recursor

%restart_on_update pdns-recursor

%defattr (-,root,root,-)
%dir %{_sysconfdir}/pdns/
%config(noreplace) %{_sysconfdir}/pdns/recursor.conf
%config(noreplace) %{_sysconfdir}/init.d/%{name}
%doc README COPYING rrd/ powerdns-example-script.lua
%dir %{home}
%ghost %dir %{_localstatedir}