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