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