Search
j0ke.net Open Build Service
>
Projects
>
home:opeter
>
powerdns
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 6
[-]
[+]
Changed
pdns-server.spec
@@ -1,179 +1,172 @@ -# -# spec file for package pdns (Version 3.1) -# -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2012 InterNetX GmbH, Regensburg, 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. - -Name: pdns -Version: 3.1 -Release: 2 -# -Group: Productivity/Networking/DNS/Servers -License: GPLv2+ -# -%define pkg_name pdns -%define home %{_var}/lib/pdns -%define _localstatedir %{_var}/run/pdns -# -%if 0%{?sles_version} < 11 && 0%{?sles_version} > 0 -%define with_pdns_sqlite2 1 -%endif -%if 0%{?suse_version} > 1000 -%define with_pdns_sqlite3 1 -%endif -# -%if 0%{?centos_version} == 5 || 0%{?rhel_version} >= 500 && 0%{?rhel_version} < 600 || 0%{?sles_version} == 10 -%define use_bundled_boost 1 -%else -%define use_bundled_boost 0 -BuildRequires: boost-devel >= 1.34 -%endif -BuildRequires: docbook-toys docbook-utils docbook-xsl-stylesheets gcc-c++ gdbm-devel mysql-devel pkgconfig lua-devel >= 5.1 -%if 0%{?suse_version} -BuildRequires: pwdutils -%endif -%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} -BuildRequires: shadow-utils -%endif -# -%if 0%{?with_pdns_recursor} -BuildRequires: lua-devel pkgconfig -%endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} -PreReq: %insserv_prereq %fillup_prereq -PreReq: pwdutils -%endif -%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} -BuildRequires: shadow-utils -%endif -# -Url: http://www.powerdns.com/ -Source: %{name}-%{version}.tar.gz -Source1: rcpdns -Source2: README.opendbx -Source3: boost_1_39_0.tar.bz2 -Patch0: %{name}-%{version}-init.patch -Patch1: %{name}-%{version}-slavedb.patch +Summary: PowerDNS is a Versatile Database Driven Nameserver +Name: pdns-server +Version: 3.1 +Release: 2%{dist} +Epoch: 0 +License: GPL +Group: System/Servers +URL: http://www.powerdns.com/ +Source0: http://downloads.powerdns.com/releases/pdns-%{version}.tar.gz +Patch0: pdns-3.1-init.patch +Patch1: pdns-3.1-slavedb.patch + +Source1: http://downloads.powerdns.com/documentation/html.tar.gz + +BuildRequires: autoconf automake +BuildRequires: gcc gcc-c++ +BuildRequires: zlib-devel +BuildRequires: lua-devel +BuildRequires: boost-devel >= 1.34.0 +BuildRequires: sqlite-devel >= 3.0.0 +BuildRequires: mysql-devel >= 5.0.0 + +Requires: lua +Requires: boost-serialization >= 1.34.0 +Requires: boost-program-options >= 1.34.0 +Requires: sqlite >= 3.0.0 +Requires: mysql >= 5.0.0 -# -Summary: Modern, advanced and high performance authoritative-only nameserver +Provides: nameserver pdns-server -%description -The PowerDNS Nameserver is a modern, advanced and high performance -authoritative-only nameserver. It is written from scratch and conforms -to all relevant DNS standards documents. Furthermore, PowerDNS -interfaces with almost any database. +BuildRoot: %{_tmppath}/%{name}-%{version}-root +%description +PowerDNS is a versatile nameserver which supports a large number +of different backends ranging from simple zonefiles to relational +databases and load balancing/failover algorithms. + +This RPM comes with support for MySQL backend. + +%package tools +Summary: DNS tools for %{name} +Group: System/Servers +Requires: %{name} = %{version} + +%description tools +This package contains the DNS tools for the PowerDNS nameserver. + +%package devel +Summary: Development headers and libraries for %{name} +Group: System/Servers +Requires: %{name} = %{version} -Authors: --------- - http://www.powerdns.com +%description devel +Development headers and libraries for %{name} %prep -%setup -a 3 +%setup -q -n pdns-%{version} -a1 %patch0 -p0 -b .init %patch1 -p0 -%{__cp} modules/geobackend/README README.geobackend -# module-dir=/usr/local/lib -perl -p -i.back -e 's|module-dir=.*|module-dir=%{_libdir}/%{pkg_name}|g' pdns/pdns.conf-dist -diff -urN pdns/pdns.conf-dist{.back,} ||: -rm -v pdns/pdns.conf-dist.back %build -touch NEWS AUTHORS COPYING -##autoreconf -fiv -export CFLAGS="%{optflags} -DLDAP_DEPRECATED -g " -%if 0%{?centos_version} == 5 || 0%{?rhel_version} >= 500 && 0%{?rhel_version} < 600 || 0%{?sles_version} == 10 -cd boost_1_39_0 -./bootstrap.sh -./bjam || : -cd .. -export CXXFLAGS="$CFLAGS -I`pwd`/boost_1_39_0/" -export BOOST_ROOT=`pwd`/boost_1_39_0/ -%else -export CXXFLAGS="$CFLAGS" -%endif -# "mysql" backend is legacy crap. dont build it! %configure \ - --disable-static \ - --with-pic \ - --sysconfdir=%{_sysconfdir}/%{pkg_name} \ - --libdir=%{_libdir}/%{pkg_name} \ - --with-mysql-lib=%{_libdir} \ - --with-modules="gmysql geo" + --sysconfdir=%{_sysconfdir}/powerdns \ + --libdir=%{_libdir} \ + --with-socketdir=/var/run/pdns-server \ + --with-modules="gmysql geo" %{__make} %install -%__make DESTDIR=%{buildroot} install -%{__install} -Dd -m 0755 %{buildroot}{%{home},%{_localstatedir}} -%{__mv} %{buildroot}%{_sysconfdir}/%{pkg_name}/pdns.conf{-dist,} -%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} -%{__install} -p -D -m 0755 pdns/pdns %{buildroot}/etc/init.d/%{pkg_name} -%endif -%{__ln_s} -f ../../etc/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} -%{__rm} -rfv %{buildroot}%{_libdir}/pdns/*.la +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT + +install -d $RPM_BUILD_ROOT%{_sysconfdir}/powerdns/ +install -d $RPM_BUILD_ROOT%{_localstatedir}/run/pdns-server + +%{__make} DESTDIR=$RPM_BUILD_ROOT install + +# fix the config +mv $RPM_BUILD_ROOT%{_sysconfdir}/powerdns/pdns.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/powerdns/pdns.conf + +cat >> $RPM_BUILD_ROOT%{_sysconfdir}/powerdns/pdns.conf << EOF +module-dir=%{_libdir} +socket-dir=/var/run/pdns-server +setuid=powerdns +setgid=powerdns +launch=bind +#recursor=127.0.0.1:5300 +EOF +
Deleted
boost_1_39_0.tar.bz2
^