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/
23 BuildRequires: boost-devel >= 1.35.0
25 BuildRequires: libpq++-devel
26 BuildRequires: libstdc++-devel
27 BuildRequires: mysql-devel
28 BuildRequires: openldap-devel >= 2.4.6
29 BuildRequires: rpmbuild(macros) >= 1.268
30 BuildRequires: sed >= 4.0
31 BuildRequires: sqlite3-devel
32 BuildRequires: zlib-devel
33 Requires(post): sed >= 4.0
34 Requires(post,preun): /sbin/chkconfig
35 Requires(postun): /usr/sbin/groupdel
36 Requires(postun): /usr/sbin/userdel
37 Requires(pre): /bin/id
38 Requires(pre): /usr/bin/getgid
39 Requires(pre): /usr/sbin/groupadd
40 Requires(pre): /usr/sbin/useradd
42 Provides: group(djbdns)
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 PowerDNS is a versatile nameserver which supports a large number of
50 different backends ranging from simple zonefiles to relational
51 databases and load balancing/failover algorithms.
53 %description -l pl.UTF-8
54 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
55 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
56 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
57 i przełączania w wypadku awarii.
60 Summary: PowerDNS support for custom pipe backend
61 Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
62 Group: Development/Libraries
63 Requires: %{name} = %{version}-%{release}
65 %description backend-pipe
66 This package allows creation of own backend using simple STDIN/STDOUT
67 API. Example backend script in Perl is provided in package
70 %description backend-pipe -l pl.UTF-8
71 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
72 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
73 Perlu został dołączony do dokumentacji pakietu.
75 %package backend-gpgsql
76 Summary: PowerDNS support for PostgreSQL
77 Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a
78 Group: Development/Libraries
79 Requires: %{name} = %{version}-%{release}
81 %description backend-gpgsql
82 This package allows zone storage in PostgreSQL relational db tables.
84 %description backend-gpgsql -l pl.UTF-8
85 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
86 relacyjnej bazy danych PostgreSQL.
88 %package backend-gmysql
89 Summary: PowerDNS support for MySQL
90 Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a
91 Group: Development/Libraries
92 Requires: %{name} = %{version}-%{release}
94 %description backend-gmysql
95 This package allows zone storage in MySQL relational db tables.
97 %description backend-gmysql -l pl.UTF-8
98 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
99 relacyjnej bazy danych MySQL.
101 %package backend-gsqlite3
102 Summary: PowerDNS support for SQLite 3
103 Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a
104 Group: Development/Libraries
105 Requires: %{name} = %{version}-%{release}
107 %description backend-gsqlite3
108 This package allows zone storage in SQLite 3 relational db tables.
110 %description backend-gsqlite3 -l pl.UTF-8
111 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
112 relacyjnej bazy danych SQLite 3.
114 %package backend-ldap
115 Summary: PowerDNS support for LDAP
116 Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a
117 Group: Development/Libraries
118 Requires: %{name} = %{version}-%{release}
120 %description backend-ldap
121 This package allows zone storage in LDAP directory.
123 %description backend-ldap -l pl.UTF-8
124 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
138 %if "%{_lib}" != "lib"
139 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
143 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
145 --libdir=%{_libdir}/%{name} \
146 --sysconfdir=%{_sysconfdir}/%{name} \
152 --with-pgsql-includes=%{_includedir} \
153 --with-pgsql-lib=%{_libdir} \
154 --with-mysql-includes=%{_includedir} \
155 --with-mysql-lib=%{_libdir} \
156 --with-sqlite3-includes=%{_includedir} \
157 --with-sqlite3-lib=%{_libdir} \
158 --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
160 --with-socketdir=/var/run
165 rm -rf $RPM_BUILD_ROOT
166 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
169 DESTDIR=$RPM_BUILD_ROOT
171 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
172 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
173 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
175 # useless - modules are dlopened by *.so
176 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
179 rm -rf $RPM_BUILD_ROOT
182 %groupadd -g 32 djbdns
183 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
186 # dirty hack so the config file is processed correctly, and server does not respawn
187 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
189 /sbin/chkconfig --add pdns
190 %service pdns restart
193 if [ "$1" = "0" ]; then
195 /sbin/chkconfig --del pdns
199 if [ "$1" = "0" ]; then
205 %defattr(644,root,root,755)
206 %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt
207 %attr(754,root,root) /etc/rc.d/init.d/%{name}
208 %dir %{_sysconfdir}/%{name}
209 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
210 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
211 %attr(755,root,root) %{_sbindir}/*
212 %attr(755,root,root) %{_bindir}/*
213 %dir %{_libdir}/%{name}
216 %files backend-gmysql
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
220 %files backend-gpgsql
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
224 %files backend-gsqlite3
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*