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: 8a6ff842733aca885577eb54e983a1ff
10 Source1: http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5: cb69cd9655e4cb319c66adb2c733314d
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 URL: http://www.powerdns.com/
21 BuildRequires: boost-devel >= 1.35.0
23 BuildRequires: libpq++-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: mysql-devel
26 BuildRequires: openldap-devel >= 2.4.6
27 BuildRequires: rpmbuild(macros) >= 1.268
28 BuildRequires: sed >= 4.0
29 BuildRequires: sqlite3-devel
30 BuildRequires: zlib-devel
31 Requires(post): sed >= 4.0
32 Requires(post,preun): /sbin/chkconfig
33 Requires(postun): /usr/sbin/groupdel
34 Requires(postun): /usr/sbin/userdel
35 Requires(pre): /bin/id
36 Requires(pre): /usr/bin/getgid
37 Requires(pre): /usr/sbin/groupadd
38 Requires(pre): /usr/sbin/useradd
40 Provides: group(djbdns)
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 PowerDNS is a versatile nameserver which supports a large number of
48 different backends ranging from simple zonefiles to relational
49 databases and load balancing/failover algorithms.
51 %description -l pl.UTF-8
52 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
53 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
54 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
55 i przełączania w wypadku awarii.
58 Summary: PowerDNS support for custom pipe backend
59 Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
63 %description backend-pipe
64 This package allows creation of own backend using simple STDIN/STDOUT
65 API. Example backend script in Perl is provided in package
68 %description backend-pipe -l pl.UTF-8
69 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
70 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
71 Perlu został dołączony do dokumentacji pakietu.
73 %package backend-gpgsql
74 Summary: PowerDNS support for PostgreSQL
75 Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a
76 Group: Development/Libraries
77 Requires: %{name} = %{version}-%{release}
79 %description backend-gpgsql
80 This package allows zone storage in PostgreSQL relational db tables.
82 %description backend-gpgsql -l pl.UTF-8
83 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
84 relacyjnej bazy danych PostgreSQL.
86 %package backend-gmysql
87 Summary: PowerDNS support for MySQL
88 Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a
89 Group: Development/Libraries
90 Requires: %{name} = %{version}-%{release}
92 %description backend-gmysql
93 This package allows zone storage in MySQL relational db tables.
95 %description backend-gmysql -l pl.UTF-8
96 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
97 relacyjnej bazy danych MySQL.
99 %package backend-gsqlite3
100 Summary: PowerDNS support for SQLite 3
101 Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a
102 Group: Development/Libraries
103 Requires: %{name} = %{version}-%{release}
105 %description backend-gsqlite3
106 This package allows zone storage in SQLite 3 relational db tables.
108 %description backend-gsqlite3 -l pl.UTF-8
109 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
110 relacyjnej bazy danych SQLite 3.
112 %package backend-ldap
113 Summary: PowerDNS support for LDAP
114 Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a
115 Group: Development/Libraries
116 Requires: %{name} = %{version}-%{release}
118 %description backend-ldap
119 This package allows zone storage in LDAP directory.
121 %description backend-ldap -l pl.UTF-8
122 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
134 %if "%{_lib}" != "lib"
135 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
139 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
141 --libdir=%{_libdir}/%{name} \
142 --sysconfdir=%{_sysconfdir}/%{name} \
148 --with-pgsql-includes=%{_includedir} \
149 --with-pgsql-lib=%{_libdir} \
150 --with-mysql-includes=%{_includedir} \
151 --with-mysql-lib=%{_libdir} \
152 --with-sqlite3-includes=%{_includedir} \
153 --with-sqlite3-lib=%{_libdir} \
154 --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
156 --with-socketdir=/var/run
161 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
165 DESTDIR=$RPM_BUILD_ROOT
167 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
168 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
169 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
171 # useless - modules are dlopened by *.so
172 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
175 rm -rf $RPM_BUILD_ROOT
178 %groupadd -g 32 djbdns
179 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
182 # dirty hack so the config file is processed correctly, and server does not respawn
183 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
185 /sbin/chkconfig --add pdns
186 %service pdns restart
189 if [ "$1" = "0" ]; then
191 /sbin/chkconfig --del pdns
195 if [ "$1" = "0" ]; then
201 %defattr(644,root,root,755)
202 %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt
203 %attr(754,root,root) /etc/rc.d/init.d/%{name}
204 %dir %{_sysconfdir}/%{name}
205 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
206 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
207 %attr(755,root,root) %{_sbindir}/*
208 %attr(755,root,root) %{_bindir}/*
209 %dir %{_libdir}/%{name}
212 %files backend-gmysql
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
216 %files backend-gpgsql
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
220 %files backend-gsqlite3
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*