]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- security blocker added
[packages/pdns.git] / pdns.spec
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
3 Name:           pdns
4 Version:        2.9.21.1
5 Release:        2
6 License:        GPL
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
13 Source3:        %{name}.init
14 Source4:        %{name}.conf
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)
25 BuildRequires:  bison
26 BuildRequires:  boost-devel >= 1.35.0
27 BuildRequires:  flex
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
44 Requires:       rc-scripts
45 Provides:       group(djbdns)
46 Provides:       nameserver
47 Provides:       user(pdns)
48 Obsoletes:      powerdns
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
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.
55
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.
61
62 %package backend-pipe
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}
67
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
71 documentation.
72
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.
77
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}
83
84 %description backend-gpgsql
85 This package allows zone storage in PostgreSQL relational db tables.
86
87 %description backend-gpgsql -l pl.UTF-8
88 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
89 relacyjnej bazy danych PostgreSQL.
90
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}
96
97 %description backend-gmysql
98 This package allows zone storage in MySQL relational db tables.
99
100 %description backend-gmysql -l pl.UTF-8
101 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
102 relacyjnej bazy danych MySQL.
103
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}
109
110 %description backend-gsqlite3
111 This package allows zone storage in SQLite 3 relational db tables.
112
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.
116
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}
122
123 %description backend-ldap
124 This package allows zone storage in LDAP directory.
125
126 %description backend-ldap -l pl.UTF-8
127 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
128 LDAP.
129
130 %prep
131 %setup -q
132 %patch0 -p1
133 %patch1 -p1
134 %patch2 -p1
135 %patch3 -p1
136 %patch4 -p1
137 cp %{SOURCE1} .
138 cp %{SOURCE2} .
139 cp %{SOURCE4} .
140
141 %if "%{_lib}" != "lib"
142 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
143 %endif
144
145 %build
146 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
147 %configure \
148         --libdir=%{_libdir}/%{name} \
149         --sysconfdir=%{_sysconfdir}/%{name} \
150         --disable-static \
151         --enable-ldap \
152         --enable-mysql \
153         --enable-pgsql \
154         --enable-sqlite3 \
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" \
162         --with-modules="" \
163         --with-socketdir=/var/run
164
165 %{__make}
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
170
171 %{__make} install \
172         DESTDIR=$RPM_BUILD_ROOT
173
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
177
178 # useless - modules are dlopened by *.so
179 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %pre
185 %groupadd -g 32 djbdns
186 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
187
188 %post
189 # dirty hack so the config file is processed correctly, and server does not respawn
190 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
191
192 /sbin/chkconfig --add pdns
193 %service pdns restart
194
195 %preun
196 if [ "$1" = "0" ]; then
197         %service pdns stop
198         /sbin/chkconfig --del pdns
199 fi
200
201 %postun
202 if [ "$1" = "0" ]; then
203         %userremove pdns
204         %groupremove djbdns
205 fi
206
207 %files
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}
217 %{_mandir}/man8/*
218
219 %files backend-gmysql
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
222
223 %files backend-gpgsql
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
226
227 %files backend-gsqlite3
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
230
231 %files backend-pipe
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
234
235 %files backend-ldap
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.064471 seconds and 4 git commands to generate.