Search
j0ke.net Open Build Service
>
Projects
>
server:dns
>
pdns34
> pdns.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pdns.spec of Package pdns34 (Revision 3)
Currently displaying revision
3
,
show latest
# # spec file for package pdns # # Copyright (c) 2010 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 Version: 3.4.1 Release: 1 # 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 BuildRequires: boost141-devel %else BuildRequires: boost-devel >= 1.41 %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 %if 0%{?suse_version} >= 1210 BuildRequires: systemd %{?systemd_requires} %define has_systemd 1 %endif # Url: http://www.powerdns.com/ Source: %{name}-%{version}.tar.bz2 Source1: rcpdns Source2: README.opendbx Patch0: %{name}-fixinit.patch # Summary: Modern, advanced and high performance authoritative-only nameserver %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. Authors: -------- http://www.powerdns.com %package backend-mysql License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: MySQL backend for pdns %description backend-mysql 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. This package holds the MySQL backend for pdns. Authors: -------- http://www.powerdns.com %package backend-postgresql License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: PostgreSQL backend for pdns %description backend-postgresql 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. This package holds the PostgreSQL backend for pdns. Authors: -------- http://www.powerdns.com %if 0%{?with_pdns_sqlite2} %package backend-sqlite2 License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: SQLite 2 backend for pdns %description backend-sqlite2 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. This package holds the SQLite 2 backend for pdns. Authors: -------- http://www.powerdns.com %endif %if 0%{?with_pdns_sqlite3} %package backend-sqlite3 License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: SQLite 3 backend for pdns %description backend-sqlite3 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. This package holds the SQLite 3 backend for pdns. Authors: -------- http://www.powerdns.com %endif %package backend-ldap License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: LDAP backend for pdns %description backend-ldap 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. This package holds the LDAP backend for pdns. Authors: -------- http://www.powerdns.com %if 0%{?with_pdns_opendbx} %package backend-opendbx License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: OpenDBX backend for pdns %description backend-opendbx 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. This package holds the OpenDBX backend for pdns. Authors: -------- http://www.powerdns.com %endif %if 0%{?with_pdns_xdb} %package backend-xdb License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: Samba TDB backend for pdns %description backend-xdb 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. This package holds the Samba TDB backend for pdns. Authors: -------- http://www.powerdns.com %endif %if 0%{?with_pdns_recursor} %package -n pdns-recursor License: GPLv2+ Group: Productivity/Networking/DNS/Servers Requires: %{name} = %{version} Summary: Modern, advanced and high performance recursing/non authoritative nameserver %description -n pdns-recursor 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 %endif %prep %setup %patch0 -p1 %if 0%{?with_pdns_opendbx} %{__cp} %{S:2} README.opendbx %endif %{__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 export LDFLAGS="-L%{_libdir}/boost141" export CPPFLAGS="-I%{_includedir}/boost141" %endif # "mysql" backend is legacy crap. dont build it! %configure \ --disable-static \ --with-pic \ --sysconfdir=%{_sysconfdir}/%{pkg_name} \ --libdir=%{_libdir} \ --with-sqlite-lib=%{_libdir} \ --with-pgsql-lib=%{_libdir} \ --with-mysql-lib=%{_libdir} \ --enable-tools \ --with-modules="" \ --with-dynmodules="\ pipe \ geo \ gmysql \ gpgsql \ ldap \ %if 0%{?with_pdns_sqlite3} gsqlite3 \ %endif %if 0%{?with_pdns_sqlite2} gsqlite \ %endif %if 0%{?with_pdns_opendbx} opendbx \ %endif %if 0%{?with_pdns_xdb} xdb \ %endif %if 0%{?with_pdns_db2} db2 \ %endif %if 0%{?with_pdns_odbc} odbc \ %endif %if 0%{?with_pdns_oracle} goracle \ oracle \ %endif "\ %if 0%{?with_pdns_recursor} --enable-recursor || cat config.log %else --disable-recursor || cat config.log # we have an external package for that. %endif %{__make} %if 0%{?build_debugging_tools} pushd pdns for i in $(awk -F= '/EXTRA_PROGRAMS/ {print $2}' Makefile.am ) ; do if ! [ $(echo $i | grep -c 'pdns' 2>&1) ] ; then make $i ; fi done popd %endif %install %__make DESTDIR=%{buildroot} install %if 0%{?build_debugging_tools} pushd pdns for i in $(awk -F= '/EXTRA_PROGRAMS/ {print $2}' Makefile.am ) ; do if ! [ $(echo $i | grep -c 'pdns' 2>&1) ] ; then install -D -m 0755 $i %{buildroot}%{_sbindir}/$i ; fi done popd %endif %{__install} -Dd -m 0755 %{buildroot}{%{home},%{_localstatedir}} %{__mv} %{buildroot}%{_sysconfdir}/%{pkg_name}/pdns.conf{-dist,} %if 0%{?suse_version} %{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/%{pkg_name} %endif %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 %if 0%{?has_systemd} %{__install} -D -m 0644 contrib/systemd-pdns.service %{buildroot}%{_unitdir}/pdns.service %if 0%{?with_pdns_recursor} %{__install} -D -m 0644 contrib/systemd-pdns-recursor.service %{buildroot}%{_unitdir}/pdns-recursor.service %endif %endif # drop default docs rm -r %{buildroot}/usr/share/doc %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 nginx.service %endif %post %if 0%{?suse_version} %{fillup_and_insserv pdns} %endif %if 0%{?has_systemd} %service_add_post pdns.service %endif %preun %if 0%{?suse_version} %stop_on_removal pdns %endif %if 0%{?has_systemd} %service_del_preun pdns.service %endif %postun %if 0%{?suse_version} %restart_on_update pdns %insserv_cleanup %endif %if 0%{?has_systemd} %service_del_postun pdns.service %endif %files %defattr (-,root,root,-) %doc HACKING INSTALL README* TODO %doc modules/*/*dnssec-*.sql modules/*/schema.*.sql %config(noreplace) /etc/init.d/%{pkg_name} %if 0%{?has_systemd} %{_unitdir}/pdns.service %endif %dir %attr(750,root,pdns) %{_sysconfdir}/%{pkg_name} %config(noreplace) %attr(640,root,pdns) %{_sysconfdir}/%{pkg_name}/%{pkg_name}.conf %{_bindir}/pdns_control %{_bindir}/zone2ldap %{_bindir}/zone2sql %{_bindir}/zone2json %{_bindir}/dnsbulktest %{_bindir}/dnsscan %{_bindir}/dnsscope %{_bindir}/dnstcpbench %{_bindir}/dnswasher %{_bindir}/nproxy %{_bindir}/nsec3dig %{_bindir}/dnsreplay %{_bindir}/pdnssec %{_bindir}/dnsdist %{_bindir}/saxfr %{_sbindir}/rcpdns %{_sbindir}/pdns_server %{_mandir}/man1/dnstcpbench.1.gz %{_mandir}/man1/dnsdist.1.gz %{_mandir}/man8/dnsreplay.8.gz %{_mandir}/man8/dnsscope.8.gz %{_mandir}/man8/dnswasher.8.gz %{_mandir}/man8/pdns_control.8.gz %{_mandir}/man8/pdns_server.8.gz %{_mandir}/man8/zone2sql.8.gz %{_mandir}/man8/pdnssec.8.gz %{_mandir}/man8/zone2ldap.8.gz %dir %{_libdir}/%{pkg_name} %{_libdir}/%{pkg_name}/libpipebackend.so* %{_libdir}/%{pkg_name}/libgeobackend.so* %dir %{home} %ghost %dir %{_localstatedir} %if 0%{?with_pdns_recursor} %files -n pdns-recursor %defattr (-,root,root,-) %{_sbindir}/pdns_recursor %if 0%{?has_systemd} %{_unitdir}/pdns-recursor.service %endif %endif %files backend-mysql %defattr (-,root,root,-) %{_libdir}/%{pkg_name}/libgmysqlbackend.so* %files backend-postgresql %defattr (-,root,root,-) %{_libdir}/%{pkg_name}/libgpgsqlbackend.so* %if 0%{?with_pdns_sqlite2} %files backend-sqlite2 %defattr (-,root,root,-) %{_libdir}/%{pkg_name}/libgsqlitebackend.so* %endif %if 0%{?with_pdns_sqlite3} %files backend-sqlite3 %defattr (-,root,root,-) %{_libdir}/%{pkg_name}/libgsqlite3backend.so* %endif %files backend-ldap %defattr (-,root,root,-) %{_libdir}/%{pkg_name}/libldapbackend.so* %if 0%{?with_pdns_opendbx} %files backend-opendbx %defattr (-,root,root,-) %{_libdir}/%{pkg_name}/libopendbxbackend.so* %endif %if 0%{?with_pdns_xdb} %files backend-xdb %defattr (-,root,root,-) %{_bindir}/xdb-fill %{_libdir}/%{pkg_name}/libxdbbackend.so* %endif %changelog