]>
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 |
8a1406d5 | 4 | Version: 3.0.1 |
cd97ec5a | 5 | Release: 2 |
d5cc2b05 | 6 | License: GPL |
7 | Group: Networking/Daemons | |
d5cc2b05 | 8 | Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz |
8a1406d5 | 9 | # Source0-md5: a67763b2b45d9f3504a24607c5b4068d |
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 | |
3259f60d | 16 | Patch0: configure.ac.patch |
962c96ad | 17 | Patch1: %{name}-int16.patch |
64323608 | 18 | Patch2: %{name}-openldap-2.3.patch |
514dd7c2 | 19 | Patch3: gcc4.patch |
1c943d86 | 20 | URL: http://www.powerdns.com/ |
3259f60d ŁK |
21 | BuildRequires: autoconf >= 2.52 |
22 | BuildRequires: automake | |
d5cc2b05 | 23 | BuildRequires: bison |
11adc590 | 24 | BuildRequires: boost-devel >= 1.35.0 |
d5cc2b05 | 25 | BuildRequires: flex |
4cf6fc85 | 26 | BuildRequires: libpq++-devel |
9dfdb7d5 | 27 | BuildRequires: libstdc++-devel |
3259f60d ŁK |
28 | BuildRequires: libtool |
29 | BuildRequires: lua51-devel | |
1c943d86 | 30 | BuildRequires: mysql-devel |
89d18ff9 | 31 | BuildRequires: openldap-devel >= 2.4.6 |
9dfdb7d5 | 32 | BuildRequires: rpmbuild(macros) >= 1.268 |
10ff87d8 JB |
33 | BuildRequires: sed >= 4.0 |
34 | BuildRequires: sqlite3-devel | |
9f5c3bed | 35 | BuildRequires: zlib-devel |
9dfdb7d5 ER |
36 | Requires(post): sed >= 4.0 |
37 | Requires(post,preun): /sbin/chkconfig | |
38 | Requires(postun): /usr/sbin/groupdel | |
39 | Requires(postun): /usr/sbin/userdel | |
d5cc2b05 | 40 | Requires(pre): /bin/id |
9f5c3bed | 41 | Requires(pre): /usr/bin/getgid |
d5cc2b05 | 42 | Requires(pre): /usr/sbin/groupadd |
9f5c3bed | 43 | Requires(pre): /usr/sbin/useradd |
9dfdb7d5 | 44 | Requires: rc-scripts |
9f5c3bed | 45 | Provides: group(djbdns) |
1c943d86 | 46 | Provides: nameserver |
9f5c3bed | 47 | Provides: user(pdns) |
1c943d86 | 48 | Obsoletes: powerdns |
9dfdb7d5 | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
d5cc2b05 | 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 | ||
debd363c JR |
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. | |
d5cc2b05 | 61 | |
37897a72 | 62 | %package backend-pipe |
63 | Summary: PowerDNS support for custom pipe backend | |
48a18303 | 64 | Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a |
d5cc2b05 | 65 | Group: Development/Libraries |
86e39795 | 66 | Requires: %{name} = %{version}-%{release} |
d5cc2b05 | 67 | |
37897a72 | 68 | %description backend-pipe |
69 | This package allows creation of own backend using simple STDIN/STDOUT | |
0ce130a4 | 70 | API. Example backend script in Perl is provided in package |
83be7e7a | 71 | documentation. |
d5cc2b05 | 72 | |
debd363c JR |
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. | |
37897a72 | 77 | |
69c8ac47 | 78 | %package backend-gpgsql |
37897a72 | 79 | Summary: PowerDNS support for PostgreSQL |
48a18303 | 80 | Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a |
37897a72 | 81 | Group: Development/Libraries |
86e39795 | 82 | Requires: %{name} = %{version}-%{release} |
37897a72 | 83 | |
69c8ac47 | 84 | %description backend-gpgsql |
37897a72 | 85 | This package allows zone storage in PostgreSQL relational db tables. |
86 | ||
debd363c | 87 | %description backend-gpgsql -l pl.UTF-8 |
91965bb5 | 88 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach |
37897a72 | 89 | relacyjnej bazy danych PostgreSQL. |
90 | ||
69c8ac47 | 91 | %package backend-gmysql |
37897a72 | 92 | Summary: PowerDNS support for MySQL |
48a18303 | 93 | Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a |
37897a72 | 94 | Group: Development/Libraries |
86e39795 | 95 | Requires: %{name} = %{version}-%{release} |
37897a72 | 96 | |
69c8ac47 | 97 | %description backend-gmysql |
37897a72 | 98 | This package allows zone storage in MySQL relational db tables. |
99 | ||
debd363c | 100 | %description backend-gmysql -l pl.UTF-8 |
91965bb5 | 101 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach |
37897a72 | 102 | relacyjnej bazy danych MySQL. |
d5cc2b05 | 103 | |
78b0f5c7 | 104 | %package backend-gsqlite3 |
48a18303 JB |
105 | Summary: PowerDNS support for SQLite 3 |
106 | Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a | |
78b0f5c7 | 107 | Group: Development/Libraries |
108 | Requires: %{name} = %{version}-%{release} | |
109 | ||
110 | %description backend-gsqlite3 | |
48a18303 | 111 | This package allows zone storage in SQLite 3 relational db tables. |
78b0f5c7 | 112 | |
113 | %description backend-gsqlite3 -l pl.UTF-8 | |
114 | Ten pakiet pozwala na przechowywanie danych o strefach w tabelach | |
48a18303 | 115 | relacyjnej bazy danych SQLite 3. |
78b0f5c7 | 116 | |
69c8ac47 | 117 | %package backend-ldap |
165f995e | 118 | Summary: PowerDNS support for LDAP |
48a18303 | 119 | Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a |
165f995e | 120 | Group: Development/Libraries |
86e39795 | 121 | Requires: %{name} = %{version}-%{release} |
69c8ac47 | 122 | |
123 | %description backend-ldap | |
124 | This package allows zone storage in LDAP directory. | |
125 | ||
debd363c | 126 | %description backend-ldap -l pl.UTF-8 |
d944d5e2 | 127 | Ten pakiet pozwala na przechowywanie danych o strefach w katalogu |
128 | LDAP. | |
69c8ac47 | 129 | |
d5cc2b05 | 130 | %prep |
33ccb468 | 131 | %setup -q |
4cf6fc85 | 132 | %patch0 -p1 |
962c96ad | 133 | %patch1 -p1 |
64323608 | 134 | %patch2 -p1 |
514dd7c2 | 135 | %patch3 -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 \ |
1c943d86 JB |
151 | --libdir=%{_libdir}/%{name} \ |
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="" \ | |
161 | --with-socketdir=/var/run | |
d5cc2b05 | 162 | |
163 | %{__make} | |
164 | ||
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
f8845daa | 167 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig} |
d5cc2b05 | 168 | |
169 | %{__make} install \ | |
1c943d86 JB |
170 | DESTDIR=$RPM_BUILD_ROOT |
171 | ||
f8845daa | 172 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
1c943d86 JB |
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 | |
d5cc2b05 | 178 | |
1c943d86 JB |
179 | %clean |
180 | rm -rf $RPM_BUILD_ROOT | |
d5cc2b05 | 181 | |
182 | %pre | |
3a30c7f7 ER |
183 | %groupadd -g 32 djbdns |
184 | %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns | |
d5cc2b05 | 185 | |
186 | %post | |
e72cbcd1 | 187 | # dirty hack so the config file is processed correctly, and server does not respawn |
9dfdb7d5 | 188 | sed -i -e 's/^ *//' /etc/pdns/pdns.conf |
e72cbcd1 | 189 | |
d5cc2b05 | 190 | /sbin/chkconfig --add pdns |
9dfdb7d5 | 191 | %service pdns restart |
d5cc2b05 | 192 | |
193 | %preun | |
33ccb468 | 194 | if [ "$1" = "0" ]; then |
9dfdb7d5 | 195 | %service pdns stop |
33ccb468 | 196 | /sbin/chkconfig --del pdns |
197 | fi | |
d5cc2b05 | 198 | |
199 | %postun | |
200 | if [ "$1" = "0" ]; then | |
9f5c3bed | 201 | %userremove pdns |
202 | %groupremove djbdns | |
d5cc2b05 | 203 | fi |
204 | ||
d5cc2b05 | 205 | %files |
206 | %defattr(644,root,root,755) | |
d944d5e2 | 207 | %doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt |
f8845daa | 208 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
37897a72 | 209 | %dir %{_sysconfdir}/%{name} |
d944d5e2 | 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 | |
d5cc2b05 | 212 | %attr(755,root,root) %{_sbindir}/* |
c62fbc47 | 213 | %attr(755,root,root) %{_bindir}/* |
f8845daa | 214 | %dir %{_libdir}/%{name} |
d5cc2b05 | 215 | %{_mandir}/man8/* |
216 | ||
69c8ac47 | 217 | %files backend-gmysql |
1c943d86 | 218 | %defattr(644,root,root,755) |
33ccb468 | 219 | %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so* |
37897a72 | 220 | |
69c8ac47 | 221 | %files backend-gpgsql |
1c943d86 | 222 | %defattr(644,root,root,755) |
33ccb468 | 223 | %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so* |
37897a72 | 224 | |
78b0f5c7 | 225 | %files backend-gsqlite3 |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so* | |
228 | ||
37897a72 | 229 | %files backend-pipe |
1c943d86 | 230 | %defattr(644,root,root,755) |
33ccb468 | 231 | %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so* |
69c8ac47 | 232 | |
233 | %files backend-ldap | |
234 | %defattr(644,root,root,755) | |
235 | %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so* |