]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- rel. 2
[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 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:  openldap-devel >= 2.4.6
29 BuildRequires:  rpmbuild(macros) >= 1.268
30 BuildRequires:  sed >= 4.0
31 BuildRequires:  sqlite3-devel
32 BuildRequires:  zlib-devel
33 Requires(post): sed >= 4.0
34 Requires(post,preun):   /sbin/chkconfig
35 Requires(postun):       /usr/sbin/groupdel
36 Requires(postun):       /usr/sbin/userdel
37 Requires(pre):  /bin/id
38 Requires(pre):  /usr/bin/getgid
39 Requires(pre):  /usr/sbin/groupadd
40 Requires(pre):  /usr/sbin/useradd
41 Requires:       rc-scripts
42 Provides:       group(djbdns)
43 Provides:       nameserver
44 Provides:       user(pdns)
45 Obsoletes:      powerdns
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 PowerDNS is a versatile nameserver which supports a large number of
50 different backends ranging from simple zonefiles to relational
51 databases and load balancing/failover algorithms.
52
53 %description -l pl.UTF-8
54 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
55 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
56 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
57 i przełączania w wypadku awarii.
58
59 %package backend-pipe
60 Summary:        PowerDNS support for custom pipe backend
61 Summary(pl.UTF-8):      Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
62 Group:          Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64
65 %description backend-pipe
66 This package allows creation of own backend using simple STDIN/STDOUT
67 API. Example backend script in Perl is provided in package
68 documentation.
69
70 %description backend-pipe -l pl.UTF-8
71 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
72 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
73 Perlu został dołączony do dokumentacji pakietu.
74
75 %package backend-gpgsql
76 Summary:        PowerDNS support for PostgreSQL
77 Summary(pl.UTF-8):      Obsługa baz PostgreSQL dla PowerDNS-a
78 Group:          Development/Libraries
79 Requires:       %{name} = %{version}-%{release}
80
81 %description backend-gpgsql
82 This package allows zone storage in PostgreSQL relational db tables.
83
84 %description backend-gpgsql -l pl.UTF-8
85 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
86 relacyjnej bazy danych PostgreSQL.
87
88 %package backend-gmysql
89 Summary:        PowerDNS support for MySQL
90 Summary(pl.UTF-8):      Obsługa baz MySQL dla PowerDNS-a
91 Group:          Development/Libraries
92 Requires:       %{name} = %{version}-%{release}
93
94 %description backend-gmysql
95 This package allows zone storage in MySQL relational db tables.
96
97 %description backend-gmysql -l pl.UTF-8
98 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
99 relacyjnej bazy danych MySQL.
100
101 %package backend-gsqlite3
102 Summary:        PowerDNS support for SQLite 3
103 Summary(pl.UTF-8):      Obsługa baz SQLite 3 dla PowerDNS-a
104 Group:          Development/Libraries
105 Requires:       %{name} = %{version}-%{release}
106
107 %description backend-gsqlite3
108 This package allows zone storage in SQLite 3 relational db tables.
109
110 %description backend-gsqlite3 -l pl.UTF-8
111 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
112 relacyjnej bazy danych SQLite 3.
113
114 %package backend-ldap
115 Summary:        PowerDNS support for LDAP
116 Summary(pl.UTF-8):      Obsługa LDAP dla PowerDNS-a
117 Group:          Development/Libraries
118 Requires:       %{name} = %{version}-%{release}
119
120 %description backend-ldap
121 This package allows zone storage in LDAP directory.
122
123 %description backend-ldap -l pl.UTF-8
124 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
125 LDAP.
126
127 %prep
128 %setup -q
129 %patch0 -p1
130 %patch1 -p1
131 %patch2 -p1
132 %patch3 -p1
133 %patch4 -p1
134 cp %{SOURCE1} .
135 cp %{SOURCE2} .
136 cp %{SOURCE4} .
137
138 %if "%{_lib}" != "lib"
139 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
140 %endif
141
142 %build
143 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
144 %configure \
145         --libdir=%{_libdir}/%{name} \
146         --sysconfdir=%{_sysconfdir}/%{name} \
147         --disable-static \
148         --enable-ldap \
149         --enable-mysql \
150         --enable-pgsql \
151         --enable-sqlite3 \
152         --with-pgsql-includes=%{_includedir} \
153         --with-pgsql-lib=%{_libdir} \
154         --with-mysql-includes=%{_includedir} \
155         --with-mysql-lib=%{_libdir} \
156         --with-sqlite3-includes=%{_includedir} \
157         --with-sqlite3-lib=%{_libdir} \
158         --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
159         --with-modules="" \
160         --with-socketdir=/var/run
161
162 %{__make}
163
164 %install
165 rm -rf $RPM_BUILD_ROOT
166 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
167
168 %{__make} install \
169         DESTDIR=$RPM_BUILD_ROOT
170
171 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
172 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
173 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
174
175 # useless - modules are dlopened by *.so
176 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %pre
182 %groupadd -g 32 djbdns
183 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
184
185 %post
186 # dirty hack so the config file is processed correctly, and server does not respawn
187 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
188
189 /sbin/chkconfig --add pdns
190 %service pdns restart
191
192 %preun
193 if [ "$1" = "0" ]; then
194         %service pdns stop
195         /sbin/chkconfig --del pdns
196 fi
197
198 %postun
199 if [ "$1" = "0" ]; then
200         %userremove pdns
201         %groupremove djbdns
202 fi
203
204 %files
205 %defattr(644,root,root,755)
206 %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt
207 %attr(754,root,root) /etc/rc.d/init.d/%{name}
208 %dir %{_sysconfdir}/%{name}
209 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
210 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
211 %attr(755,root,root) %{_sbindir}/*
212 %attr(755,root,root) %{_bindir}/*
213 %dir %{_libdir}/%{name}
214 %{_mandir}/man8/*
215
216 %files backend-gmysql
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
219
220 %files backend-gpgsql
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
223
224 %files backend-gsqlite3
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
227
228 %files backend-pipe
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
231
232 %files backend-ldap
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.050091 seconds and 4 git commands to generate.