]>
Commit | Line | Data |
---|---|---|
23304159 ER |
1 | # TODO |
2 | # - warning: Installed (but unpackaged) file(s) found: | |
3 | # /etc/pdns/pdns.conf-dist | |
d5cc2b05 | 4 | Summary: PowerDNS is a Versatile Database Driven Nameserver |
cc7a52d9 | 5 | Summary(pl.UTF-8): PowerDNS to wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych |
3cfcf782 | 6 | Name: pdns |
23304159 ER |
7 | Version: 3.4.6 |
8 | Release: 1 | |
d5cc2b05 | 9 | License: GPL |
10 | Group: Networking/Daemons | |
f6c8362c | 11 | Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2 |
23304159 | 12 | # Source0-md5: 1d44709f07bc62dabdaa34d67c894de5 |
d5cc2b05 | 13 | Source1: http://downloads.powerdns.com/documentation/%{name}.pdf |
335359b4 | 14 | # Source1-md5: cb69cd9655e4cb319c66adb2c733314d |
33ccb468 | 15 | Source2: http://downloads.powerdns.com/documentation/%{name}.txt |
16 | Source3: %{name}.init | |
17 | Source4: %{name}.conf | |
18 | Source5: %{name}.sysconfig | |
f6c8362c ŁK |
19 | Patch0: %{name}-int16.patch |
20 | Patch1: %{name}-openldap-2.3.patch | |
1c943d86 | 21 | URL: http://www.powerdns.com/ |
f6c8362c ŁK |
22 | BuildRequires: autoconf >= 2.61 |
23 | BuildRequires: automake >= 1.11 | |
d5cc2b05 | 24 | BuildRequires: bison |
11adc590 | 25 | BuildRequires: boost-devel >= 1.35.0 |
d5cc2b05 | 26 | BuildRequires: flex |
4cf6fc85 | 27 | BuildRequires: libpq++-devel |
9dfdb7d5 | 28 | BuildRequires: libstdc++-devel |
3259f60d | 29 | BuildRequires: libtool |
f6c8362c | 30 | BuildRequires: lua-devel >= 5.1 |
1c943d86 | 31 | BuildRequires: mysql-devel |
89d18ff9 | 32 | BuildRequires: openldap-devel >= 2.4.6 |
f6c8362c | 33 | BuildRequires: polarssl-devel >= 1.1 |
9dfdb7d5 | 34 | BuildRequires: rpmbuild(macros) >= 1.268 |
10ff87d8 JB |
35 | BuildRequires: sed >= 4.0 |
36 | BuildRequires: sqlite3-devel | |
9f5c3bed | 37 | BuildRequires: zlib-devel |
9dfdb7d5 ER |
38 | Requires(post): sed >= 4.0 |
39 | Requires(post,preun): /sbin/chkconfig | |
40 | Requires(postun): /usr/sbin/groupdel | |
41 | Requires(postun): /usr/sbin/userdel | |
d5cc2b05 | 42 | Requires(pre): /bin/id |
9f5c3bed | 43 | Requires(pre): /usr/bin/getgid |
d5cc2b05 | 44 | Requires(pre): /usr/sbin/groupadd |
9f5c3bed | 45 | Requires(pre): /usr/sbin/useradd |
9dfdb7d5 | 46 | Requires: rc-scripts |
9f5c3bed | 47 | Provides: group(djbdns) |
1c943d86 | 48 | Provides: nameserver |
9f5c3bed | 49 | Provides: user(pdns) |
1c943d86 | 50 | Obsoletes: powerdns |
9dfdb7d5 | 51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
d5cc2b05 | 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 | ||
debd363c JR |
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. | |
d5cc2b05 | 63 | |
37897a72 | 64 | %package backend-pipe |
65 | Summary: PowerDNS support for custom pipe backend | |
48a18303 | 66 | Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a |
d5cc2b05 | 67 | Group: Development/Libraries |
86e39795 | 68 | Requires: %{name} = %{version}-%{release} |
d5cc2b05 | 69 | |
37897a72 | 70 | %description backend-pipe |
71 | This package allows creation of own backend using simple STDIN/STDOUT | |
0ce130a4 | 72 | API. Example backend script in Perl is provided in package |
83be7e7a | 73 | documentation. |
d5cc2b05 | 74 | |
debd363c JR |
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. | |
37897a72 | 79 | |
69c8ac47 | 80 | %package backend-gpgsql |
37897a72 | 81 | Summary: PowerDNS support for PostgreSQL |
48a18303 | 82 | Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a |
37897a72 | 83 | Group: Development/Libraries |
86e39795 | 84 | Requires: %{name} = %{version}-%{release} |
37897a72 | 85 | |
69c8ac47 | 86 | %description backend-gpgsql |
37897a72 | 87 | This package allows zone storage in PostgreSQL relational db tables. |
88 | ||
debd363c | 89 | %description backend-gpgsql -l pl.UTF-8 |
91965bb5 | 90 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach |
37897a72 | 91 | relacyjnej bazy danych PostgreSQL. |
92 | ||
69c8ac47 | 93 | %package backend-gmysql |
37897a72 | 94 | Summary: PowerDNS support for MySQL |
48a18303 | 95 | Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a |
37897a72 | 96 | Group: Development/Libraries |
86e39795 | 97 | Requires: %{name} = %{version}-%{release} |
37897a72 | 98 | |
69c8ac47 | 99 | %description backend-gmysql |
37897a72 | 100 | This package allows zone storage in MySQL relational db tables. |
101 | ||
debd363c | 102 | %description backend-gmysql -l pl.UTF-8 |
91965bb5 | 103 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach |
37897a72 | 104 | relacyjnej bazy danych MySQL. |
d5cc2b05 | 105 | |
78b0f5c7 | 106 | %package backend-gsqlite3 |
48a18303 JB |
107 | Summary: PowerDNS support for SQLite 3 |
108 | Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a | |
78b0f5c7 | 109 | Group: Development/Libraries |
110 | Requires: %{name} = %{version}-%{release} | |
111 | ||
112 | %description backend-gsqlite3 | |
48a18303 | 113 | This package allows zone storage in SQLite 3 relational db tables. |
78b0f5c7 | 114 | |
115 | %description backend-gsqlite3 -l pl.UTF-8 | |
116 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach | |
48a18303 | 117 | relacyjnej bazy danych SQLite 3. |
78b0f5c7 | 118 | |
69c8ac47 | 119 | %package backend-ldap |
165f995e | 120 | Summary: PowerDNS support for LDAP |
48a18303 | 121 | Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a |
165f995e | 122 | Group: Development/Libraries |
86e39795 | 123 | Requires: %{name} = %{version}-%{release} |
69c8ac47 | 124 | |
125 | %description backend-ldap | |
126 | This package allows zone storage in LDAP directory. | |
127 | ||
debd363c | 128 | %description backend-ldap -l pl.UTF-8 |
d944d5e2 | 129 | Ten pakiet pozwala na przechowywanie danych o strefach w katalogu |
130 | LDAP. | |
69c8ac47 | 131 | |
d5cc2b05 | 132 | %prep |
33ccb468 | 133 | %setup -q |
4cf6fc85 | 134 | %patch0 -p1 |
962c96ad | 135 | %patch1 -p1 |
33ccb468 | 136 | cp %{SOURCE1} . |
137 | cp %{SOURCE2} . | |
91e921c8 SP |
138 | cp %{SOURCE4} . |
139 | ||
48a18303 JB |
140 | %if "%{_lib}" != "lib" |
141 | %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf | |
91e921c8 | 142 | %endif |
d5cc2b05 | 143 | |
144 | %build | |
83be7e7a | 145 | CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\"" |
3259f60d ŁK |
146 | %{__libtoolize} |
147 | %{__aclocal} -I . | |
148 | %{__autoconf} | |
149 | %{__automake} | |
d5cc2b05 | 150 | %configure \ |
23304159 | 151 | --disable-silent-rules \ |
1c943d86 | 152 | --sysconfdir=%{_sysconfdir}/%{name} \ |
48a18303 | 153 | --disable-static \ |
3259f60d | 154 | --with-lua \ |
e72cbcd1 | 155 | --with-pgsql-includes=%{_includedir} \ |
48a18303 | 156 | --with-pgsql-lib=%{_libdir} \ |
6fee4fd0 | 157 | --with-mysql-includes=%{_includedir} \ |
48a18303 | 158 | --with-mysql-lib=%{_libdir} \ |
48a18303 JB |
159 | --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \ |
160 | --with-modules="" \ | |
f6c8362c | 161 | --with-system-polarssl \ |
48a18303 | 162 | --with-socketdir=/var/run |
d5cc2b05 | 163 | |
164 | %{__make} | |
165 | ||
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
f8845daa | 168 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig} |
d5cc2b05 | 169 | |
170 | %{__make} install \ | |
1c943d86 JB |
171 | DESTDIR=$RPM_BUILD_ROOT |
172 | ||
f6c8362c ŁK |
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 | |
1c943d86 JB |
176 | |
177 | # useless - modules are dlopened by *.so | |
eaff2c55 JR |
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} | |
d5cc2b05 | 182 | |
1c943d86 JB |
183 | %clean |
184 | rm -rf $RPM_BUILD_ROOT | |
d5cc2b05 | 185 | |
186 | %pre | |
3a30c7f7 ER |
187 | %groupadd -g 32 djbdns |
188 | %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns | |
d5cc2b05 | 189 | |
190 | %post | |
e72cbcd1 | 191 | # dirty hack so the config file is processed correctly, and server does not respawn |
9dfdb7d5 | 192 | sed -i -e 's/^ *//' /etc/pdns/pdns.conf |
e72cbcd1 | 193 | |
d5cc2b05 | 194 | /sbin/chkconfig --add pdns |
9dfdb7d5 | 195 | %service pdns restart |
d5cc2b05 | 196 | |
197 | %preun | |
33ccb468 | 198 | if [ "$1" = "0" ]; then |
9dfdb7d5 | 199 | %service pdns stop |
33ccb468 | 200 | /sbin/chkconfig --del pdns |
201 | fi | |
d5cc2b05 | 202 | |
203 | %postun | |
204 | if [ "$1" = "0" ]; then | |
9f5c3bed | 205 | %userremove pdns |
206 | %groupremove djbdns | |
d5cc2b05 | 207 | fi |
208 | ||
d5cc2b05 | 209 | %files |
210 | %defattr(644,root,root,755) | |
f6c8362c | 211 | %doc INSTALL README pdns.pdf pdns.txt |
f8845daa | 212 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
37897a72 | 213 | %dir %{_sysconfdir}/%{name} |
d944d5e2 | 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 | |
e96a5cfd ŁK |
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 | |
f8845daa | 222 | %dir %{_libdir}/%{name} |
e96a5cfd ŁK |
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* | |
d5cc2b05 | 228 | |
69c8ac47 | 229 | %files backend-gmysql |
1c943d86 | 230 | %defattr(644,root,root,755) |
eaff2c55 | 231 | %doc modules/gmysqlbackend/*schema.mysql.sql |
33ccb468 | 232 | %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so* |
37897a72 | 233 | |
69c8ac47 | 234 | %files backend-gpgsql |
1c943d86 | 235 | %defattr(644,root,root,755) |
eaff2c55 | 236 | %doc modules/gpgsqlbackend/*schema.pgsql.sql |
33ccb468 | 237 | %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so* |
37897a72 | 238 | |
78b0f5c7 | 239 | %files backend-gsqlite3 |
240 | %defattr(644,root,root,755) | |
eaff2c55 | 241 | %doc modules/gsqlite3backend/*schema.sqlite3.sql |
78b0f5c7 | 242 | %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so* |
243 | ||
37897a72 | 244 | %files backend-pipe |
1c943d86 | 245 | %defattr(644,root,root,755) |
33ccb468 | 246 | %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so* |
69c8ac47 | 247 | |
248 | %files backend-ldap | |
249 | %defattr(644,root,root,755) | |
250 | %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so* |