2 # - warning: Installed (but unpackaged) file(s) found:
3 # /etc/pdns/pdns.conf-dist
4 Summary: PowerDNS is a Versatile Database Driven Nameserver
5 Summary(pl.UTF-8): PowerDNS to wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych
10 Group: Networking/Daemons
11 Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
12 # Source0-md5: 1d44709f07bc62dabdaa34d67c894de5
13 Source1: http://downloads.powerdns.com/documentation/%{name}.pdf
14 # Source1-md5: cb69cd9655e4cb319c66adb2c733314d
15 Source2: http://downloads.powerdns.com/documentation/%{name}.txt
18 Source5: %{name}.sysconfig
19 Patch0: %{name}-int16.patch
20 Patch1: %{name}-openldap-2.3.patch
21 URL: http://www.powerdns.com/
22 BuildRequires: autoconf >= 2.61
23 BuildRequires: automake >= 1.11
25 BuildRequires: boost-devel >= 1.35.0
27 BuildRequires: libpq++-devel
28 BuildRequires: libstdc++-devel
29 BuildRequires: libtool
30 BuildRequires: lua-devel >= 5.1
31 BuildRequires: mysql-devel
32 BuildRequires: openldap-devel >= 2.4.6
33 BuildRequires: polarssl-devel >= 1.1
34 BuildRequires: rpmbuild(macros) >= 1.268
35 BuildRequires: sed >= 4.0
36 BuildRequires: sqlite3-devel
37 BuildRequires: zlib-devel
38 Requires(post): sed >= 4.0
39 Requires(post,preun): /sbin/chkconfig
40 Requires(postun): /usr/sbin/groupdel
41 Requires(postun): /usr/sbin/userdel
42 Requires(pre): /bin/id
43 Requires(pre): /usr/bin/getgid
44 Requires(pre): /usr/sbin/groupadd
45 Requires(pre): /usr/sbin/useradd
47 Provides: group(djbdns)
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 PowerDNS is a versatile nameserver which supports a large number of
55 different backends ranging from simple zonefiles to relational
56 databases and load balancing/failover algorithms.
58 %description -l pl.UTF-8
59 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
60 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
61 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
62 i przełączania w wypadku awarii.
65 Summary: PowerDNS support for custom pipe backend
66 Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
67 Group: Development/Libraries
68 Requires: %{name} = %{version}-%{release}
70 %description backend-pipe
71 This package allows creation of own backend using simple STDIN/STDOUT
72 API. Example backend script in Perl is provided in package
75 %description backend-pipe -l pl.UTF-8
76 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
77 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
78 Perlu został dołączony do dokumentacji pakietu.
80 %package backend-gpgsql
81 Summary: PowerDNS support for PostgreSQL
82 Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a
83 Group: Development/Libraries
84 Requires: %{name} = %{version}-%{release}
86 %description backend-gpgsql
87 This package allows zone storage in PostgreSQL relational db tables.
89 %description backend-gpgsql -l pl.UTF-8
90 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
91 relacyjnej bazy danych PostgreSQL.
93 %package backend-gmysql
94 Summary: PowerDNS support for MySQL
95 Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a
96 Group: Development/Libraries
97 Requires: %{name} = %{version}-%{release}
99 %description backend-gmysql
100 This package allows zone storage in MySQL relational db tables.
102 %description backend-gmysql -l pl.UTF-8
103 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
104 relacyjnej bazy danych MySQL.
106 %package backend-gsqlite3
107 Summary: PowerDNS support for SQLite 3
108 Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a
109 Group: Development/Libraries
110 Requires: %{name} = %{version}-%{release}
112 %description backend-gsqlite3
113 This package allows zone storage in SQLite 3 relational db tables.
115 %description backend-gsqlite3 -l pl.UTF-8
116 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
117 relacyjnej bazy danych SQLite 3.
119 %package backend-ldap
120 Summary: PowerDNS support for LDAP
121 Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a
122 Group: Development/Libraries
123 Requires: %{name} = %{version}-%{release}
125 %description backend-ldap
126 This package allows zone storage in LDAP directory.
128 %description backend-ldap -l pl.UTF-8
129 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
140 %if "%{_lib}" != "lib"
141 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
145 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
151 --disable-silent-rules \
152 --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-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
161 --with-system-polarssl \
162 --with-socketdir=/var/run
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
171 DESTDIR=$RPM_BUILD_ROOT
173 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
174 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
175 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
177 # useless - modules are dlopened by *.so
178 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
180 # we put that in using %doc
181 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
184 rm -rf $RPM_BUILD_ROOT
187 %groupadd -g 32 djbdns
188 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
191 # dirty hack so the config file is processed correctly, and server does not respawn
192 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
194 /sbin/chkconfig --add pdns
195 %service pdns restart
198 if [ "$1" = "0" ]; then
200 /sbin/chkconfig --del pdns
204 if [ "$1" = "0" ]; then
210 %defattr(644,root,root,755)
211 %doc INSTALL README pdns.pdf pdns.txt
212 %attr(754,root,root) /etc/rc.d/init.d/%{name}
213 %dir %{_sysconfdir}/%{name}
214 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
215 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
216 %attr(755,root,root) %{_sbindir}/pdns_server
217 %attr(755,root,root) %{_bindir}/pdns_control
218 %attr(755,root,root) %{_bindir}/pdnssec
219 %attr(755,root,root) %{_bindir}/zone2json
220 %attr(755,root,root) %{_bindir}/zone2ldap
221 %attr(755,root,root) %{_bindir}/zone2sql
222 %dir %{_libdir}/%{name}
223 %{_mandir}/man1/pdns_control.1*
224 %{_mandir}/man1/pdns_server.1*
225 %{_mandir}/man1/pdnssec.1*
226 %{_mandir}/man1/zone2ldap.1*
227 %{_mandir}/man1/zone2sql.1*
229 %files backend-gmysql
230 %defattr(644,root,root,755)
231 %doc modules/gmysqlbackend/*schema.mysql.sql
232 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
234 %files backend-gpgsql
235 %defattr(644,root,root,755)
236 %doc modules/gpgsqlbackend/*schema.pgsql.sql
237 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
239 %files backend-gsqlite3
240 %defattr(644,root,root,755)
241 %doc modules/gsqlite3backend/*schema.sqlite3.sql
242 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*