]> git.pld-linux.org Git - packages/pdns.git/blame - pdns.spec
- release 2 (by relup.sh)
[packages/pdns.git] / pdns.spec
CommitLineData
23304159
ER
1# TODO
2# - warning: Installed (but unpackaged) file(s) found:
3# /etc/pdns/pdns.conf-dist
3a181db1 4# - do not use 'djbdns' group!
482f17d2
JB
5Summary: PowerDNS - a Versatile Database Driven Nameserver
6Summary(pl.UTF-8): PowerDNS - wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych
3cfcf782 7Name: pdns
a29ceed8 8Version: 4.3.1
ea9e1ef4 9Release: 2
5558125e 10License: GPL v2
d5cc2b05 11Group: Networking/Daemons
547c593f 12Source0: https://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
a29ceed8 13# Source0-md5: 59011d4337dc02d9b114918781f96bee
547c593f 14Source1: https://downloads.powerdns.com/documentation/%{name}.pdf
24a3dfd6 15# Source1-md5: 15bdde9d84af6ef1485dc2f5fa3f81df
547c593f 16Source2: https://downloads.powerdns.com/documentation/%{name}.txt
33ccb468 17Source3: %{name}.init
18Source4: %{name}.conf
19Source5: %{name}.sysconfig
311afc3c 20Patch0: %{name}-boost.patch
f6c8362c 21Patch1: %{name}-openldap-2.3.patch
547c593f 22URL: https://www.powerdns.com/
f6c8362c 23BuildRequires: autoconf >= 2.61
5558125e 24BuildRequires: automake >= 1:1.11
d5cc2b05 25BuildRequires: bison
11adc590 26BuildRequires: boost-devel >= 1.35.0
d5cc2b05 27BuildRequires: flex
4cf6fc85 28BuildRequires: libpq++-devel
5558125e
JB
29BuildRequires: libstdc++-devel >= 6:4.7
30BuildRequires: libtool >= 2:2.2.2
f6c8362c 31BuildRequires: lua-devel >= 5.1
1c943d86 32BuildRequires: mysql-devel
89d18ff9 33BuildRequires: openldap-devel >= 2.4.6
5558125e
JB
34BuildRequires: openssl-devel
35BuildRequires: pkgconfig
f6c8362c 36BuildRequires: polarssl-devel >= 1.1
5558125e
JB
37BuildRequires: postgresql-devel
38BuildRequires: protobuf-devel
de9dbb26 39BuildRequires: rpmbuild(macros) >= 1.647
10ff87d8 40BuildRequires: sed >= 4.0
5558125e 41BuildRequires: sqlite3-devel >= 3
9f5c3bed 42BuildRequires: zlib-devel
de9dbb26 43Requires(post,preun,postun): systemd-units >= 38
9dfdb7d5
ER
44Requires(post): sed >= 4.0
45Requires(post,preun): /sbin/chkconfig
46Requires(postun): /usr/sbin/groupdel
47Requires(postun): /usr/sbin/userdel
d5cc2b05 48Requires(pre): /bin/id
9f5c3bed 49Requires(pre): /usr/bin/getgid
d5cc2b05 50Requires(pre): /usr/sbin/groupadd
9f5c3bed 51Requires(pre): /usr/sbin/useradd
9dfdb7d5 52Requires: rc-scripts
de9dbb26 53Requires: systemd-units >= 0.38
9f5c3bed 54Provides: group(djbdns)
1c943d86 55Provides: nameserver
9f5c3bed 56Provides: user(pdns)
1c943d86 57Obsoletes: powerdns
9dfdb7d5 58BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
d5cc2b05 59
60%description
61PowerDNS is a versatile nameserver which supports a large number of
62different backends ranging from simple zonefiles to relational
63databases and load balancing/failover algorithms.
64
debd363c
JR
65%description -l pl.UTF-8
66PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
67od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
68danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
69i przełączania w wypadku awarii.
d5cc2b05 70
37897a72 71%package backend-pipe
72Summary: PowerDNS support for custom pipe backend
48a18303 73Summary(pl.UTF-8): Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
d5cc2b05 74Group: Development/Libraries
86e39795 75Requires: %{name} = %{version}-%{release}
d5cc2b05 76
37897a72 77%description backend-pipe
78This package allows creation of own backend using simple STDIN/STDOUT
0ce130a4 79API. Example backend script in Perl is provided in package
83be7e7a 80documentation.
d5cc2b05 81
debd363c
JR
82%description backend-pipe -l pl.UTF-8
83Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
84stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
85Perlu został dołączony do dokumentacji pakietu.
37897a72 86
69c8ac47 87%package backend-gpgsql
37897a72 88Summary: PowerDNS support for PostgreSQL
48a18303 89Summary(pl.UTF-8): Obsługa baz PostgreSQL dla PowerDNS-a
37897a72 90Group: Development/Libraries
86e39795 91Requires: %{name} = %{version}-%{release}
37897a72 92
69c8ac47 93%description backend-gpgsql
37897a72 94This package allows zone storage in PostgreSQL relational db tables.
95
debd363c 96%description backend-gpgsql -l pl.UTF-8
91965bb5 97Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
37897a72 98relacyjnej bazy danych PostgreSQL.
99
69c8ac47 100%package backend-gmysql
37897a72 101Summary: PowerDNS support for MySQL
48a18303 102Summary(pl.UTF-8): Obsługa baz MySQL dla PowerDNS-a
37897a72 103Group: Development/Libraries
86e39795 104Requires: %{name} = %{version}-%{release}
37897a72 105
69c8ac47 106%description backend-gmysql
37897a72 107This package allows zone storage in MySQL relational db tables.
108
debd363c 109%description backend-gmysql -l pl.UTF-8
91965bb5 110Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
37897a72 111relacyjnej bazy danych MySQL.
d5cc2b05 112
78b0f5c7 113%package backend-gsqlite3
48a18303
JB
114Summary: PowerDNS support for SQLite 3
115Summary(pl.UTF-8): Obsługa baz SQLite 3 dla PowerDNS-a
78b0f5c7 116Group: Development/Libraries
117Requires: %{name} = %{version}-%{release}
118
119%description backend-gsqlite3
48a18303 120This package allows zone storage in SQLite 3 relational db tables.
78b0f5c7 121
122%description backend-gsqlite3 -l pl.UTF-8
123Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
48a18303 124relacyjnej bazy danych SQLite 3.
78b0f5c7 125
69c8ac47 126%package backend-ldap
165f995e 127Summary: PowerDNS support for LDAP
48a18303 128Summary(pl.UTF-8): Obsługa LDAP dla PowerDNS-a
165f995e 129Group: Development/Libraries
86e39795 130Requires: %{name} = %{version}-%{release}
69c8ac47 131
132%description backend-ldap
133This package allows zone storage in LDAP directory.
134
debd363c 135%description backend-ldap -l pl.UTF-8
d944d5e2 136Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
137LDAP.
69c8ac47 138
d5cc2b05 139%prep
33ccb468 140%setup -q
311afc3c 141%patch0 -p1
962c96ad 142%patch1 -p1
482f17d2
JB
143cp -p %{SOURCE1} .
144cp -p %{SOURCE2} .
145cp -p %{SOURCE4} .
91e921c8 146
48a18303
JB
147%if "%{_lib}" != "lib"
148%{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
91e921c8 149%endif
d5cc2b05 150
151%build
83be7e7a 152CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
3259f60d
ŁK
153%{__libtoolize}
154%{__aclocal} -I .
155%{__autoconf}
156%{__automake}
d5cc2b05 157%configure \
1c943d86 158 --sysconfdir=%{_sysconfdir}/%{name} \
5558125e 159 --disable-silent-rules \
48a18303 160 --disable-static \
e684e810 161 --enable-tools \
5558125e 162 --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
3259f60d 163 --with-lua \
5558125e 164 --with-modules="" \
6fee4fd0 165 --with-mysql-includes=%{_includedir} \
48a18303 166 --with-mysql-lib=%{_libdir} \
5558125e
JB
167 --with-pgsql-includes=%{_includedir} \
168 --with-pgsql-lib=%{_libdir} \
de9dbb26 169 --with-socketdir=/var/run \
5558125e 170 --with-system-polarssl \
de9dbb26 171 --with-systemd=%{systemdunitdir}
d5cc2b05 172
de9dbb26 173%{__make}
d5cc2b05 174
175%install
176rm -rf $RPM_BUILD_ROOT
f8845daa 177install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
d5cc2b05 178
179%{__make} install \
1c943d86
JB
180 DESTDIR=$RPM_BUILD_ROOT
181
f6c8362c
ŁK
182cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
183cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
184cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
1c943d86
JB
185
186# useless - modules are dlopened by *.so
eaff2c55
JR
187%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
188
189# we put that in using %doc
190%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
d5cc2b05 191
1c943d86
JB
192%clean
193rm -rf $RPM_BUILD_ROOT
d5cc2b05 194
195%pre
3a30c7f7
ER
196%groupadd -g 32 djbdns
197%useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
d5cc2b05 198
199%post
de9dbb26 200%systemd_post %{name}.service
e72cbcd1 201# dirty hack so the config file is processed correctly, and server does not respawn
9dfdb7d5 202sed -i -e 's/^ *//' /etc/pdns/pdns.conf
e72cbcd1 203
d5cc2b05 204/sbin/chkconfig --add pdns
9dfdb7d5 205%service pdns restart
d5cc2b05 206
207%preun
33ccb468 208if [ "$1" = "0" ]; then
9dfdb7d5 209 %service pdns stop
33ccb468 210 /sbin/chkconfig --del pdns
211fi
de9dbb26 212%systemd_preun %{name}.service
d5cc2b05 213
214%postun
215if [ "$1" = "0" ]; then
9f5c3bed 216 %userremove pdns
217 %groupremove djbdns
d5cc2b05 218fi
de9dbb26 219%systemd_reload
d5cc2b05 220
d5cc2b05 221%files
222%defattr(644,root,root,755)
f6c8362c 223%doc INSTALL README pdns.pdf pdns.txt
547c593f 224%attr(754,root,root) /etc/rc.d/init.d/pdns
37897a72 225%dir %{_sysconfdir}/%{name}
d944d5e2 226%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
227%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
de9dbb26
JR
228%{systemdunitdir}/pdns.service
229%{systemdunitdir}/pdns@.service
e96a5cfd 230%attr(755,root,root) %{_sbindir}/pdns_server
e684e810
JR
231%attr(755,root,root) %{_bindir}/calidns
232%attr(755,root,root) %{_bindir}/dnsbulktest
233%attr(755,root,root) %{_bindir}/dnsgram
234%attr(755,root,root) %{_bindir}/dnspcap2calidns
de9dbb26 235%attr(755,root,root) %{_bindir}/dnspcap2protobuf
e684e810
JR
236%attr(755,root,root) %{_bindir}/dnsreplay
237%attr(755,root,root) %{_bindir}/dnsscan
238%attr(755,root,root) %{_bindir}/dnsscope
239%attr(755,root,root) %{_bindir}/dnstcpbench
240%attr(755,root,root) %{_bindir}/dnswasher
241%attr(755,root,root) %{_bindir}/dumresp
242%attr(755,root,root) %{_bindir}/ixplore
243%attr(755,root,root) %{_bindir}/nproxy
244%attr(755,root,root) %{_bindir}/nsec3dig
e96a5cfd 245%attr(755,root,root) %{_bindir}/pdns_control
e684e810 246%attr(755,root,root) %{_bindir}/pdns_notify
de9dbb26 247%attr(755,root,root) %{_bindir}/pdnsutil
e684e810
JR
248%attr(755,root,root) %{_bindir}/saxfr
249%attr(755,root,root) %{_bindir}/sdig
250%attr(755,root,root) %{_bindir}/stubquery
e96a5cfd
ŁK
251%attr(755,root,root) %{_bindir}/zone2json
252%attr(755,root,root) %{_bindir}/zone2ldap
253%attr(755,root,root) %{_bindir}/zone2sql
f8845daa 254%dir %{_libdir}/%{name}
e684e810 255%{_mandir}/man1/calidns.1*
de9dbb26 256%{_mandir}/man1/dnsbulktest.1*
e684e810
JR
257%{_mandir}/man1/dnsgram.1*
258%{_mandir}/man1/dnspcap2calidns.1*
de9dbb26 259%{_mandir}/man1/dnspcap2protobuf.1*
e684e810
JR
260%{_mandir}/man1/dnsreplay.1*
261%{_mandir}/man1/dnsscan.1*
262%{_mandir}/man1/dnsscope.1*
de9dbb26 263%{_mandir}/man1/dnstcpbench.1*
e684e810
JR
264%{_mandir}/man1/dnswasher.1*
265%{_mandir}/man1/dumresp.1*
266%{_mandir}/man1/ixplore.1*
267%{_mandir}/man1/nproxy.1*
268%{_mandir}/man1/nsec3dig.1*
e96a5cfd 269%{_mandir}/man1/pdns_control.1*
e684e810 270%{_mandir}/man1/pdns_notify.1*
e96a5cfd 271%{_mandir}/man1/pdns_server.1*
de9dbb26 272%{_mandir}/man1/pdnsutil.1*
e684e810
JR
273%{_mandir}/man1/saxfr.1*
274%{_mandir}/man1/sdig.1*
de9dbb26 275%{_mandir}/man1/zone2json.1*
e96a5cfd
ŁK
276%{_mandir}/man1/zone2ldap.1*
277%{_mandir}/man1/zone2sql.1*
d5cc2b05 278
69c8ac47 279%files backend-gmysql
1c943d86 280%defattr(644,root,root,755)
eaff2c55 281%doc modules/gmysqlbackend/*schema.mysql.sql
33ccb468 282%attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
37897a72 283
69c8ac47 284%files backend-gpgsql
1c943d86 285%defattr(644,root,root,755)
eaff2c55 286%doc modules/gpgsqlbackend/*schema.pgsql.sql
33ccb468 287%attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
37897a72 288
78b0f5c7 289%files backend-gsqlite3
290%defattr(644,root,root,755)
eaff2c55 291%doc modules/gsqlite3backend/*schema.sqlite3.sql
78b0f5c7 292%attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
293
37897a72 294%files backend-pipe
1c943d86 295%defattr(644,root,root,755)
33ccb468 296%attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
69c8ac47 297
298%files backend-ldap
299%defattr(644,root,root,755)
300%attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.172829 seconds and 4 git commands to generate.