]>
Commit | Line | Data |
---|---|---|
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: 3.0.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: a67763b2b45d9f3504a24607c5b4068d | |
10 | Source1: http://downloads.powerdns.com/documentation/%{name}.pdf | |
11 | # Source1-md5: cb69cd9655e4cb319c66adb2c733314d | |
12 | Source2: http://downloads.powerdns.com/documentation/%{name}.txt | |
13 | Source3: %{name}.init | |
14 | Source4: %{name}.conf | |
15 | Source5: %{name}.sysconfig | |
16 | Patch0: configure.ac.patch | |
17 | Patch1: %{name}-int16.patch | |
18 | Patch2: %{name}-openldap-2.3.patch | |
19 | Patch3: gcc4.patch | |
20 | URL: http://www.powerdns.com/ | |
21 | BuildRequires: autoconf >= 2.52 | |
22 | BuildRequires: automake | |
23 | BuildRequires: bison | |
24 | BuildRequires: boost-devel >= 1.35.0 | |
25 | BuildRequires: flex | |
26 | BuildRequires: libpq++-devel | |
27 | BuildRequires: libstdc++-devel | |
28 | BuildRequires: libtool | |
29 | BuildRequires: lua51-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 | 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 | --libdir=%{_libdir}/%{name} \ | |
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-socketdir=/var/run | |
162 | ||
163 | %{__make} | |
164 | ||
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig} | |
168 | ||
169 | %{__make} install \ | |
170 | DESTDIR=$RPM_BUILD_ROOT | |
171 | ||
172 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
173 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf | |
174 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns | |
175 | ||
176 | # useless - modules are dlopened by *.so | |
177 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la | |
178 | ||
179 | %clean | |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | ||
182 | %pre | |
183 | %groupadd -g 32 djbdns | |
184 | %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns | |
185 | ||
186 | %post | |
187 | # dirty hack so the config file is processed correctly, and server does not respawn | |
188 | sed -i -e 's/^ *//' /etc/pdns/pdns.conf | |
189 | ||
190 | /sbin/chkconfig --add pdns | |
191 | %service pdns restart | |
192 | ||
193 | %preun | |
194 | if [ "$1" = "0" ]; then | |
195 | %service pdns stop | |
196 | /sbin/chkconfig --del pdns | |
197 | fi | |
198 | ||
199 | %postun | |
200 | if [ "$1" = "0" ]; then | |
201 | %userremove pdns | |
202 | %groupremove djbdns | |
203 | fi | |
204 | ||
205 | %files | |
206 | %defattr(644,root,root,755) | |
207 | %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt | |
208 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
209 | %dir %{_sysconfdir}/%{name} | |
210 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
211 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns | |
212 | %attr(755,root,root) %{_sbindir}/* | |
213 | %attr(755,root,root) %{_bindir}/* | |
214 | %dir %{_libdir}/%{name} | |
215 | %{_mandir}/man8/* | |
216 | ||
217 | %files backend-gmysql | |
218 | %defattr(644,root,root,755) | |
219 | %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so* | |
220 | ||
221 | %files backend-gpgsql | |
222 | %defattr(644,root,root,755) | |
223 | %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so* | |
224 | ||
225 | %files backend-gsqlite3 | |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so* | |
228 | ||
229 | %files backend-pipe | |
230 | %defattr(644,root,root,755) | |
231 | %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so* | |
232 | ||
233 | %files backend-ldap | |
234 | %defattr(644,root,root,755) | |
235 | %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so* |