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
20 URL: http://www.powerdns.com/
22 BuildRequires: boost-devel >= 1.35.0
24 BuildRequires: libpq++-devel
25 BuildRequires: libstdc++-devel
26 BuildRequires: mysql-devel
27 BuildRequires: openldap-devel >= 2.4.6
28 BuildRequires: rpmbuild(macros) >= 1.268
29 BuildRequires: sed >= 4.0
30 BuildRequires: sqlite3-devel
31 BuildRequires: zlib-devel
32 Requires(post): sed >= 4.0
33 Requires(post,preun): /sbin/chkconfig
34 Requires(postun): /usr/sbin/groupdel
35 Requires(postun): /usr/sbin/userdel
36 Requires(pre): /bin/id
37 Requires(pre): /usr/bin/getgid
38 Requires(pre): /usr/sbin/groupadd
39 Requires(pre): /usr/sbin/useradd
41 Provides: group(djbdns)
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 PowerDNS is a versatile nameserver which supports a large number of
49 different backends ranging from simple zonefiles to relational
50 databases and load balancing/failover algorithms.
52 %description -l pl.UTF-8
53 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
54 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
55 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
56 i przełączania w wypadku awarii.
59 Summary: PowerDNS support for custom pipe backend
60 Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
64 %description backend-pipe
65 This package allows creation of own backend using simple STDIN/STDOUT
66 API. Example backend script in Perl is provided in package
69 %description backend-pipe -l pl.UTF-8
70 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
71 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
72 Perlu został dołączony do dokumentacji pakietu.
74 %package backend-gpgsql
75 Summary: PowerDNS support for PostgreSQL
76 Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a
77 Group: Development/Libraries
78 Requires: %{name} = %{version}-%{release}
80 %description backend-gpgsql
81 This package allows zone storage in PostgreSQL relational db tables.
83 %description backend-gpgsql -l pl.UTF-8
84 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
85 relacyjnej bazy danych PostgreSQL.
87 %package backend-gmysql
88 Summary: PowerDNS support for MySQL
89 Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a
90 Group: Development/Libraries
91 Requires: %{name} = %{version}-%{release}
93 %description backend-gmysql
94 This package allows zone storage in MySQL relational db tables.
96 %description backend-gmysql -l pl.UTF-8
97 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
98 relacyjnej bazy danych MySQL.
100 %package backend-gsqlite3
101 Summary: PowerDNS support for SQLite 3
102 Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a
103 Group: Development/Libraries
104 Requires: %{name} = %{version}-%{release}
106 %description backend-gsqlite3
107 This package allows zone storage in SQLite 3 relational db tables.
109 %description backend-gsqlite3 -l pl.UTF-8
110 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
111 relacyjnej bazy danych SQLite 3.
113 %package backend-ldap
114 Summary: PowerDNS support for LDAP
115 Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a
116 Group: Development/Libraries
117 Requires: %{name} = %{version}-%{release}
119 %description backend-ldap
120 This package allows zone storage in LDAP directory.
122 %description backend-ldap -l pl.UTF-8
123 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
136 %if "%{_lib}" != "lib"
137 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
141 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
143 --libdir=%{_libdir}/%{name} \
144 --sysconfdir=%{_sysconfdir}/%{name} \
150 --with-pgsql-includes=%{_includedir} \
151 --with-pgsql-lib=%{_libdir} \
152 --with-mysql-includes=%{_includedir} \
153 --with-mysql-lib=%{_libdir} \
154 --with-sqlite3-includes=%{_includedir} \
155 --with-sqlite3-lib=%{_libdir} \
156 --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
158 --with-socketdir=/var/run
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
167 DESTDIR=$RPM_BUILD_ROOT
169 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
170 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
171 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
173 # useless - modules are dlopened by *.so
174 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
177 rm -rf $RPM_BUILD_ROOT
180 %groupadd -g 32 djbdns
181 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
184 # dirty hack so the config file is processed correctly, and server does not respawn
185 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
187 /sbin/chkconfig --add pdns
188 %service pdns restart
191 if [ "$1" = "0" ]; then
193 /sbin/chkconfig --del pdns
197 if [ "$1" = "0" ]; then
203 %defattr(644,root,root,755)
204 %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt
205 %attr(754,root,root) /etc/rc.d/init.d/%{name}
206 %dir %{_sysconfdir}/%{name}
207 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
208 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
209 %attr(755,root,root) %{_sbindir}/*
210 %attr(755,root,root) %{_bindir}/*
211 %dir %{_libdir}/%{name}
214 %files backend-gmysql
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
218 %files backend-gpgsql
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
222 %files backend-gsqlite3
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*