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 2
[-]
[+]
Changed
pdns-server.spec
@@ -1,172 +1,197 @@ -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 +# +# 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 openldap2-devel postgresql-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 +# we add opendbx-backend-sqlite2 as we pull in sqlite2 anyway and we need one installed backend +%if 0%{?with_pdns_sqlite3} +BuildRequires: sqlite-devel >= 3 +%endif +# +%if 0%{?with_pdns_sqlite2} +%if 0%{?sles_version} == 9 +BuildRequires: sqlite-devel +%else +BuildRequires: sqlite2-devel +%endif +%endif +# +%if 0%{?with_pdns_opendbx} +BuildRequires: opendbx-backend-pgsql opendbx-devel +%endif +%if 0%{?with_pdns_xdb} +BuildRequires: tdb-devel +%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}-fixinit.patch +Patch1: %{name}-%{version}-slavedb.patch -Provides: nameserver pdns-server +# +Summary: Modern, advanced and high performance authoritative-only nameserver -BuildRoot: %{_tmppath}/%{name}-%{version}-root +%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. -%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} -%description devel -Development headers and libraries for %{name} +Authors: +-------- + http://www.powerdns.com %prep -%setup -q -n pdns-%{version} -a1 -%patch0 -p0 -b .init -%patch1 -p0 +%setup -a 3 +%patch0 -p1 +%patch1 -p1 +%{__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 \ - --sysconfdir=%{_sysconfdir}/powerdns \ - --libdir=%{_libdir} \ - --with-socketdir=/var/run/pdns-server \ - --with-modules="gmysql geo" + --disable-static \ + --with-pic \ + --sysconfdir=%{_sysconfdir}/%{pkg_name} \ + --libdir=%{_libdir}/%{pkg_name} \ + --with-mysql-lib=%{_libdir} \ + --with-modules="gmysql geo" %{__make} %install -[ "$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 -
Added
boost_1_39_0.tar.bz2
^