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