]>
Commit | Line | Data |
---|---|---|
d5cc2b05 | 1 | Summary: PowerDNS is a Versatile Database Driven Nameserver |
cc7a52d9 | 2 | Summary(pl.UTF-8): PowerDNS to wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych |
3cfcf782 | 3 | Name: pdns |
335359b4 | 4 | Version: 2.9.22 |
2da8d13c | 5 | Release: 2 |
d5cc2b05 | 6 | License: GPL |
7 | Group: Networking/Daemons | |
d5cc2b05 | 8 | Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz |
335359b4 | 9 | # Source0-md5: 8a6ff842733aca885577eb54e983a1ff |
d5cc2b05 | 10 | Source1: http://downloads.powerdns.com/documentation/%{name}.pdf |
335359b4 | 11 | # Source1-md5: cb69cd9655e4cb319c66adb2c733314d |
33ccb468 | 12 | Source2: http://downloads.powerdns.com/documentation/%{name}.txt |
13 | Source3: %{name}.init | |
14 | Source4: %{name}.conf | |
15 | Source5: %{name}.sysconfig | |
4cf6fc85 | 16 | Patch0: %{name}-configure.patch |
962c96ad | 17 | Patch1: %{name}-int16.patch |
64323608 | 18 | Patch2: %{name}-openldap-2.3.patch |
1c943d86 | 19 | URL: http://www.powerdns.com/ |
d5cc2b05 | 20 | BuildRequires: bison |
11adc590 | 21 | BuildRequires: boost-devel >= 1.35.0 |
d5cc2b05 | 22 | BuildRequires: flex |
4cf6fc85 | 23 | BuildRequires: libpq++-devel |
9dfdb7d5 | 24 | BuildRequires: libstdc++-devel |
1c943d86 | 25 | BuildRequires: mysql-devel |
89d18ff9 | 26 | BuildRequires: openldap-devel >= 2.4.6 |
9dfdb7d5 | 27 | BuildRequires: rpmbuild(macros) >= 1.268 |
10ff87d8 JB |
28 | BuildRequires: sed >= 4.0 |
29 | BuildRequires: sqlite3-devel | |
9f5c3bed | 30 | BuildRequires: zlib-devel |
9dfdb7d5 ER |
31 | Requires(post): sed >= 4.0 |
32 | Requires(post,preun): /sbin/chkconfig | |
33 | Requires(postun): /usr/sbin/groupdel | |
34 | Requires(postun): /usr/sbin/userdel | |
d5cc2b05 | 35 | Requires(pre): /bin/id |
9f5c3bed | 36 | Requires(pre): /usr/bin/getgid |
d5cc2b05 | 37 | Requires(pre): /usr/sbin/groupadd |
9f5c3bed | 38 | Requires(pre): /usr/sbin/useradd |
9dfdb7d5 | 39 | Requires: rc-scripts |
9f5c3bed | 40 | Provides: group(djbdns) |
1c943d86 | 41 | Provides: nameserver |
9f5c3bed | 42 | Provides: user(pdns) |
1c943d86 | 43 | Obsoletes: powerdns |
9dfdb7d5 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
d5cc2b05 | 45 | |
46 | %description | |
47 | PowerDNS is a versatile nameserver which supports a large number of | |
48 | different backends ranging from simple zonefiles to relational | |
49 | databases and load balancing/failover algorithms. | |
50 | ||
debd363c JR |
51 | %description -l pl.UTF-8 |
52 | PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek | |
53 | od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach | |
54 | danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia | |
55 | i przełączania w wypadku awarii. | |
d5cc2b05 | 56 | |
37897a72 | 57 | %package backend-pipe |
58 | Summary: PowerDNS support for custom pipe backend | |
48a18303 | 59 | Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a |
d5cc2b05 | 60 | Group: Development/Libraries |
86e39795 | 61 | Requires: %{name} = %{version}-%{release} |
d5cc2b05 | 62 | |
37897a72 | 63 | %description backend-pipe |
64 | This package allows creation of own backend using simple STDIN/STDOUT | |
0ce130a4 | 65 | API. Example backend script in Perl is provided in package |
83be7e7a | 66 | documentation. |
d5cc2b05 | 67 | |
debd363c JR |
68 | %description backend-pipe -l pl.UTF-8 |
69 | Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania | |
70 | stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w | |
71 | Perlu został dołączony do dokumentacji pakietu. | |
37897a72 | 72 | |
69c8ac47 | 73 | %package backend-gpgsql |
37897a72 | 74 | Summary: PowerDNS support for PostgreSQL |
48a18303 | 75 | Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a |
37897a72 | 76 | Group: Development/Libraries |
86e39795 | 77 | Requires: %{name} = %{version}-%{release} |
37897a72 | 78 | |
69c8ac47 | 79 | %description backend-gpgsql |
37897a72 | 80 | This package allows zone storage in PostgreSQL relational db tables. |
81 | ||
debd363c | 82 | %description backend-gpgsql -l pl.UTF-8 |
91965bb5 | 83 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach |
37897a72 | 84 | relacyjnej bazy danych PostgreSQL. |
85 | ||
69c8ac47 | 86 | %package backend-gmysql |
37897a72 | 87 | Summary: PowerDNS support for MySQL |
48a18303 | 88 | Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a |
37897a72 | 89 | Group: Development/Libraries |
86e39795 | 90 | Requires: %{name} = %{version}-%{release} |
37897a72 | 91 | |
69c8ac47 | 92 | %description backend-gmysql |
37897a72 | 93 | This package allows zone storage in MySQL relational db tables. |
94 | ||
debd363c | 95 | %description backend-gmysql -l pl.UTF-8 |
91965bb5 | 96 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach |
37897a72 | 97 | relacyjnej bazy danych MySQL. |
d5cc2b05 | 98 | |
78b0f5c7 | 99 | %package backend-gsqlite3 |
48a18303 JB |
100 | Summary: PowerDNS support for SQLite 3 |
101 | Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a | |
78b0f5c7 | 102 | Group: Development/Libraries |
103 | Requires: %{name} = %{version}-%{release} | |
104 | ||
105 | %description backend-gsqlite3 | |
48a18303 | 106 | This package allows zone storage in SQLite 3 relational db tables. |
78b0f5c7 | 107 | |
108 | %description backend-gsqlite3 -l pl.UTF-8 | |
109 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach | |
48a18303 | 110 | relacyjnej bazy danych SQLite 3. |
78b0f5c7 | 111 | |
69c8ac47 | 112 | %package backend-ldap |
165f995e | 113 | Summary: PowerDNS support for LDAP |
48a18303 | 114 | Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a |
165f995e | 115 | Group: Development/Libraries |
86e39795 | 116 | Requires: %{name} = %{version}-%{release} |
69c8ac47 | 117 | |
118 | %description backend-ldap | |
119 | This package allows zone storage in LDAP directory. | |
120 | ||
debd363c | 121 | %description backend-ldap -l pl.UTF-8 |
d944d5e2 | 122 | Ten pakiet pozwala na przechowywanie danych o strefach w katalogu |
123 | LDAP. | |
69c8ac47 | 124 | |
d5cc2b05 | 125 | %prep |
33ccb468 | 126 | %setup -q |
4cf6fc85 | 127 | %patch0 -p1 |
962c96ad | 128 | %patch1 -p1 |
64323608 | 129 | %patch2 -p1 |
33ccb468 | 130 | cp %{SOURCE1} . |
131 | cp %{SOURCE2} . | |
91e921c8 SP |
132 | cp %{SOURCE4} . |
133 | ||
48a18303 JB |
134 | %if "%{_lib}" != "lib" |
135 | %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf | |
91e921c8 | 136 | %endif |
d5cc2b05 | 137 | |
138 | %build | |
83be7e7a | 139 | CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\"" |
d5cc2b05 | 140 | %configure \ |
1c943d86 JB |
141 | --libdir=%{_libdir}/%{name} \ |
142 | --sysconfdir=%{_sysconfdir}/%{name} \ | |
48a18303 JB |
143 | --disable-static \ |
144 | --enable-ldap \ | |
1c943d86 JB |
145 | --enable-mysql \ |
146 | --enable-pgsql \ | |
78b0f5c7 | 147 | --enable-sqlite3 \ |
e72cbcd1 | 148 | --with-pgsql-includes=%{_includedir} \ |
48a18303 | 149 | --with-pgsql-lib=%{_libdir} \ |
6fee4fd0 | 150 | --with-mysql-includes=%{_includedir} \ |
48a18303 | 151 | --with-mysql-lib=%{_libdir} \ |
78b0f5c7 | 152 | --with-sqlite3-includes=%{_includedir} \ |
48a18303 JB |
153 | --with-sqlite3-lib=%{_libdir} \ |
154 | --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \ | |
155 | --with-modules="" \ | |
156 | --with-socketdir=/var/run | |
d5cc2b05 | 157 | |
158 | %{__make} | |
159 | ||
160 | %install | |
161 | rm -rf $RPM_BUILD_ROOT | |
f8845daa | 162 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig} |
d5cc2b05 | 163 | |
164 | %{__make} install \ | |
1c943d86 JB |
165 | DESTDIR=$RPM_BUILD_ROOT |
166 | ||
f8845daa | 167 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
1c943d86 JB |
168 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf |
169 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns | |
170 | ||
171 | # useless - modules are dlopened by *.so | |
172 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la | |
d5cc2b05 | 173 | |
1c943d86 JB |
174 | %clean |
175 | rm -rf $RPM_BUILD_ROOT | |
d5cc2b05 | 176 | |
177 | %pre | |
3a30c7f7 ER |
178 | %groupadd -g 32 djbdns |
179 | %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns | |
d5cc2b05 | 180 | |
181 | %post | |
e72cbcd1 | 182 | # dirty hack so the config file is processed correctly, and server does not respawn |
9dfdb7d5 | 183 | sed -i -e 's/^ *//' /etc/pdns/pdns.conf |
e72cbcd1 | 184 | |
d5cc2b05 | 185 | /sbin/chkconfig --add pdns |
9dfdb7d5 | 186 | %service pdns restart |
d5cc2b05 | 187 | |
188 | %preun | |
33ccb468 | 189 | if [ "$1" = "0" ]; then |
9dfdb7d5 | 190 | %service pdns stop |
33ccb468 | 191 | /sbin/chkconfig --del pdns |
192 | fi | |
d5cc2b05 | 193 | |
194 | %postun | |
195 | if [ "$1" = "0" ]; then | |
9f5c3bed | 196 | %userremove pdns |
197 | %groupremove djbdns | |
d5cc2b05 | 198 | fi |
199 | ||
d5cc2b05 | 200 | %files |
201 | %defattr(644,root,root,755) | |
d944d5e2 | 202 | %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt |
f8845daa | 203 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
37897a72 | 204 | %dir %{_sysconfdir}/%{name} |
d944d5e2 | 205 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf |
206 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns | |
d5cc2b05 | 207 | %attr(755,root,root) %{_sbindir}/* |
c62fbc47 | 208 | %attr(755,root,root) %{_bindir}/* |
f8845daa | 209 | %dir %{_libdir}/%{name} |
d5cc2b05 | 210 | %{_mandir}/man8/* |
211 | ||
69c8ac47 | 212 | %files backend-gmysql |
1c943d86 | 213 | %defattr(644,root,root,755) |
33ccb468 | 214 | %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so* |
37897a72 | 215 | |
69c8ac47 | 216 | %files backend-gpgsql |
1c943d86 | 217 | %defattr(644,root,root,755) |
33ccb468 | 218 | %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so* |
37897a72 | 219 | |
78b0f5c7 | 220 | %files backend-gsqlite3 |
221 | %defattr(644,root,root,755) | |
222 | %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so* | |
223 | ||
37897a72 | 224 | %files backend-pipe |
1c943d86 | 225 | %defattr(644,root,root,755) |
33ccb468 | 226 | %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so* |
69c8ac47 | 227 | |
228 | %files backend-ldap | |
229 | %defattr(644,root,root,755) | |
230 | %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so* |