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