]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
up to 3.4.6
[packages/pdns.git] / pdns.spec
1 # TODO
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
6 Name:           pdns
7 Version:        3.4.6
8 Release:        1
9 License:        GPL
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
16 Source3:        %{name}.init
17 Source4:        %{name}.conf
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
24 BuildRequires:  bison
25 BuildRequires:  boost-devel >= 1.35.0
26 BuildRequires:  flex
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
46 Requires:       rc-scripts
47 Provides:       group(djbdns)
48 Provides:       nameserver
49 Provides:       user(pdns)
50 Obsoletes:      powerdns
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
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.
57
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.
63
64 %package backend-pipe
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}
69
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
73 documentation.
74
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.
79
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}
85
86 %description backend-gpgsql
87 This package allows zone storage in PostgreSQL relational db tables.
88
89 %description backend-gpgsql -l pl.UTF-8
90 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
91 relacyjnej bazy danych PostgreSQL.
92
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}
98
99 %description backend-gmysql
100 This package allows zone storage in MySQL relational db tables.
101
102 %description backend-gmysql -l pl.UTF-8
103 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
104 relacyjnej bazy danych MySQL.
105
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}
111
112 %description backend-gsqlite3
113 This package allows zone storage in SQLite 3 relational db tables.
114
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.
118
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}
124
125 %description backend-ldap
126 This package allows zone storage in LDAP directory.
127
128 %description backend-ldap -l pl.UTF-8
129 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
130 LDAP.
131
132 %prep
133 %setup -q
134 %patch0 -p1
135 %patch1 -p1
136 cp %{SOURCE1} .
137 cp %{SOURCE2} .
138 cp %{SOURCE4} .
139
140 %if "%{_lib}" != "lib"
141 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
142 %endif
143
144 %build
145 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
146 %{__libtoolize}
147 %{__aclocal} -I .
148 %{__autoconf}
149 %{__automake}
150 %configure \
151         --disable-silent-rules \
152         --sysconfdir=%{_sysconfdir}/%{name} \
153         --disable-static \
154         --with-lua \
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" \
160         --with-modules="" \
161         --with-system-polarssl \
162         --with-socketdir=/var/run
163
164 %{__make}
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
169
170 %{__make} install \
171         DESTDIR=$RPM_BUILD_ROOT
172
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
176
177 # useless - modules are dlopened by *.so
178 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
179
180 # we put that in using %doc
181 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
182
183 %clean
184 rm -rf $RPM_BUILD_ROOT
185
186 %pre
187 %groupadd -g 32 djbdns
188 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
189
190 %post
191 # dirty hack so the config file is processed correctly, and server does not respawn
192 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
193
194 /sbin/chkconfig --add pdns
195 %service pdns restart
196
197 %preun
198 if [ "$1" = "0" ]; then
199         %service pdns stop
200         /sbin/chkconfig --del pdns
201 fi
202
203 %postun
204 if [ "$1" = "0" ]; then
205         %userremove pdns
206         %groupremove djbdns
207 fi
208
209 %files
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*
228
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*
233
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*
238
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*
243
244 %files backend-pipe
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
247
248 %files backend-ldap
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.043105 seconds and 4 git commands to generate.