1 Summary: PowerDNS is a Versatile Database Driven Nameserver
2 Summary(pl.UTF-8): PowerDNS to wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych
7 Group: Networking/Daemons
8 Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
9 # Source0-md5: 27fd39029a80cb9c0bc3037420515d1a
10 Source1: http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5: 920b1660258fa2f6d6f949f0c60857b4
12 Source2: http://downloads.powerdns.com/documentation/%{name}.txt
15 Source5: %{name}.sysconfig
16 Patch0: %{name}-configure.patch
17 Patch1: %{name}-int16.patch
18 Patch2: %{name}-openldap-2.3.patch
19 Patch3: %{name}-strerror.patch
20 Patch4: %{name}-stdlib.patch
21 URL: http://www.powerdns.com/
22 # http://doc.powerdns.com/powerdns-advisory-2008-03.html
23 # Upgrade to 2.9.21.2:
24 BuildRequires: security(SA-2008-02)
26 BuildRequires: boost-devel >= 1.35.0
28 BuildRequires: libpq++-devel
29 BuildRequires: libstdc++-devel
30 BuildRequires: mysql-devel
31 BuildRequires: openldap-devel >= 2.4.6
32 BuildRequires: rpmbuild(macros) >= 1.268
33 BuildRequires: sed >= 4.0
34 BuildRequires: sqlite3-devel
35 BuildRequires: zlib-devel
36 Requires(post): sed >= 4.0
37 Requires(post,preun): /sbin/chkconfig
38 Requires(postun): /usr/sbin/groupdel
39 Requires(postun): /usr/sbin/userdel
40 Requires(pre): /bin/id
41 Requires(pre): /usr/bin/getgid
42 Requires(pre): /usr/sbin/groupadd
43 Requires(pre): /usr/sbin/useradd
45 Provides: group(djbdns)
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 PowerDNS is a versatile nameserver which supports a large number of
53 different backends ranging from simple zonefiles to relational
54 databases and load balancing/failover algorithms.
56 %description -l pl.UTF-8
57 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
58 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
59 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
60 i przełączania w wypadku awarii.
63 Summary: PowerDNS support for custom pipe backend
64 Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
65 Group: Development/Libraries
66 Requires: %{name} = %{version}-%{release}
68 %description backend-pipe
69 This package allows creation of own backend using simple STDIN/STDOUT
70 API. Example backend script in Perl is provided in package
73 %description backend-pipe -l pl.UTF-8
74 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
75 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
76 Perlu został dołączony do dokumentacji pakietu.
78 %package backend-gpgsql
79 Summary: PowerDNS support for PostgreSQL
80 Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a
81 Group: Development/Libraries
82 Requires: %{name} = %{version}-%{release}
84 %description backend-gpgsql
85 This package allows zone storage in PostgreSQL relational db tables.
87 %description backend-gpgsql -l pl.UTF-8
88 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
89 relacyjnej bazy danych PostgreSQL.
91 %package backend-gmysql
92 Summary: PowerDNS support for MySQL
93 Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a
94 Group: Development/Libraries
95 Requires: %{name} = %{version}-%{release}
97 %description backend-gmysql
98 This package allows zone storage in MySQL relational db tables.
100 %description backend-gmysql -l pl.UTF-8
101 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
102 relacyjnej bazy danych MySQL.
104 %package backend-gsqlite3
105 Summary: PowerDNS support for SQLite 3
106 Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a
107 Group: Development/Libraries
108 Requires: %{name} = %{version}-%{release}
110 %description backend-gsqlite3
111 This package allows zone storage in SQLite 3 relational db tables.
113 %description backend-gsqlite3 -l pl.UTF-8
114 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
115 relacyjnej bazy danych SQLite 3.
117 %package backend-ldap
118 Summary: PowerDNS support for LDAP
119 Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a
120 Group: Development/Libraries
121 Requires: %{name} = %{version}-%{release}
123 %description backend-ldap
124 This package allows zone storage in LDAP directory.
126 %description backend-ldap -l pl.UTF-8
127 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
141 %if "%{_lib}" != "lib"
142 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
146 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
148 --libdir=%{_libdir}/%{name} \
149 --sysconfdir=%{_sysconfdir}/%{name} \
155 --with-pgsql-includes=%{_includedir} \
156 --with-pgsql-lib=%{_libdir} \
157 --with-mysql-includes=%{_includedir} \
158 --with-mysql-lib=%{_libdir} \
159 --with-sqlite3-includes=%{_includedir} \
160 --with-sqlite3-lib=%{_libdir} \
161 --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
163 --with-socketdir=/var/run
168 rm -rf $RPM_BUILD_ROOT
169 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
172 DESTDIR=$RPM_BUILD_ROOT
174 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
175 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
176 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
178 # useless - modules are dlopened by *.so
179 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
182 rm -rf $RPM_BUILD_ROOT
185 %groupadd -g 32 djbdns
186 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
189 # dirty hack so the config file is processed correctly, and server does not respawn
190 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
192 /sbin/chkconfig --add pdns
193 %service pdns restart
196 if [ "$1" = "0" ]; then
198 /sbin/chkconfig --del pdns
202 if [ "$1" = "0" ]; then
208 %defattr(644,root,root,755)
209 %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt
210 %attr(754,root,root) /etc/rc.d/init.d/%{name}
211 %dir %{_sysconfdir}/%{name}
212 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
213 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
214 %attr(755,root,root) %{_sbindir}/*
215 %attr(755,root,root) %{_bindir}/*
216 %dir %{_libdir}/%{name}
219 %files backend-gmysql
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
223 %files backend-gpgsql
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
227 %files backend-gsqlite3
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*