]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- fixes compatibility with later boost and later stdlib
[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:        1
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 BuildRequires:  bison
23 BuildRequires:  boost-devel >= 1.35.0
24 BuildRequires:  flex
25 BuildRequires:  libpq++-devel
26 BuildRequires:  libstdc++-devel
27 BuildRequires:  mysql-devel
28 BuildRequires:  sqlite3-devel
29 BuildRequires:  openldap-devel >= 2.4.6
30 BuildRequires:  rpmbuild(macros) >= 1.268
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
40 Requires:       rc-scripts
41 Provides:       group(djbdns)
42 Provides:       nameserver
43 Provides:       user(pdns)
44 Obsoletes:      powerdns
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
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.
51
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.
57
58 %package backend-pipe
59 Summary:        PowerDNS support for custom pipe backend
60 Summary(pl.UTF-8):      Wsparcie PowerDNS dla własnego mechanizmu przechowywania stref
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}-%{release}
63
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
67 documentation.
68
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.
73
74 %package backend-gpgsql
75 Summary:        PowerDNS support for PostgreSQL
76 Summary(pl.UTF-8):      Wsparcie PowerDNS dla baz PostgresQL
77 Group:          Development/Libraries
78 Requires:       %{name} = %{version}-%{release}
79
80 %description backend-gpgsql
81 This package allows zone storage in PostgreSQL relational db tables.
82
83 %description backend-gpgsql -l pl.UTF-8
84 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
85 relacyjnej bazy danych PostgreSQL.
86
87 %package backend-gmysql
88 Summary:        PowerDNS support for MySQL
89 Summary(pl.UTF-8):      Wsparcie PowerDNS dla baz MySQL
90 Group:          Development/Libraries
91 Requires:       %{name} = %{version}-%{release}
92
93 %description backend-gmysql
94 This package allows zone storage in MySQL relational db tables.
95
96 %description backend-gmysql -l pl.UTF-8
97 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
98 relacyjnej bazy danych MySQL.
99
100 %package backend-gsqlite3
101 Summary:        PowerDNS support for Sqlite3
102 Summary(pl.UTF-8):      Wsparcie PowerDNS dla baz Sqlite3
103 Group:          Development/Libraries
104 Requires:       %{name} = %{version}-%{release}
105
106 %description backend-gsqlite3
107 This package allows zone storage in Sqlite3 relational db tables.
108
109 %description backend-gsqlite3 -l pl.UTF-8
110 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
111 relacyjnej bazy danych Sqlite3.
112
113 %package backend-ldap
114 Summary:        PowerDNS support for LDAP
115 Summary(pl.UTF-8):      Wsparcie PowerDNS dla baz LDAP
116 Group:          Development/Libraries
117 Requires:       %{name} = %{version}-%{release}
118
119 %description backend-ldap
120 This package allows zone storage in LDAP directory.
121
122 %description backend-ldap -l pl.UTF-8
123 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
124 LDAP.
125
126 %prep
127 %setup -q
128 %patch0 -p1
129 %patch1 -p1
130 %patch2 -p1
131 %patch3 -p1
132 %patch4 -p1
133 cp %{SOURCE1} .
134 cp %{SOURCE2} .
135 cp %{SOURCE4} .
136
137 %if "%{_lib}" == "lib64"
138 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/lib64\/pdns/' pdns.conf
139 %endif
140
141 %build
142 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
143 %configure \
144         --libdir=%{_libdir}/%{name} \
145         --sysconfdir=%{_sysconfdir}/%{name} \
146         --with-socketdir=/var/run \
147         --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
148         --with-modules="" \
149         --enable-mysql \
150         --enable-pgsql \
151         --enable-sqlite3 \
152         --with-pgsql-lib=%{_libdir} \
153         --with-pgsql-includes=%{_includedir} \
154         --with-mysql-lib=%{_libdir} \
155         --with-mysql-includes=%{_includedir} \
156         --with-sqlite3-lib=%{_libdir} \
157         --with-sqlite3-includes=%{_includedir} \
158         --enable-ldap \
159         --disable-static
160
161 %{__make}
162
163 %install
164 rm -rf $RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
166
167 %{__make} install \
168         DESTDIR=$RPM_BUILD_ROOT
169
170 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
171 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
172 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
173
174 # useless - modules are dlopened by *.so
175 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
176
177 %clean
178 rm -rf $RPM_BUILD_ROOT
179
180 %pre
181 %groupadd -g 32 djbdns
182 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
183
184 %post
185 # dirty hack so the config file is processed correctly, and server does not respawn
186 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
187
188 /sbin/chkconfig --add pdns
189 %service pdns restart
190
191 %preun
192 if [ "$1" = "0" ]; then
193         %service pdns stop
194         /sbin/chkconfig --del pdns
195 fi
196
197 %postun
198 if [ "$1" = "0" ]; then
199         %userremove pdns
200         %groupremove djbdns
201 fi
202
203 %files
204 %defattr(644,root,root,755)
205 %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt
206 %attr(754,root,root) /etc/rc.d/init.d/%{name}
207 %dir %{_sysconfdir}/%{name}
208 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
209 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
210 %attr(755,root,root) %{_sbindir}/*
211 %attr(755,root,root) %{_bindir}/*
212 %dir %{_libdir}/%{name}
213 %{_mandir}/man8/*
214
215 %files backend-gmysql
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
218
219 %files backend-gpgsql
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
222
223 %files backend-gsqlite3
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
226
227 %files backend-pipe
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
230
231 %files backend-ldap
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.051613 seconds and 4 git commands to generate.