X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=pdns.spec;h=75cd29ea4723a294252aaaac2305d5ed10cf842c;hb=16f527c30b3fe01e5e503bb0f17f59c397e2f911;hp=632d0989c62cbe1898a080c88848ec265e1c2c76;hpb=37ccc38c600e97486e4f711661b97a8160a9ca2a;p=packages%2Fpdns.git diff --git a/pdns.spec b/pdns.spec index 632d098..75cd29e 100644 --- a/pdns.spec +++ b/pdns.spec @@ -1,35 +1,41 @@ +# TODO +# - warning: Installed (but unpackaged) file(s) found: +# /etc/pdns/pdns.conf-dist +# - do not use 'djbdns' group! Summary: PowerDNS is a Versatile Database Driven Nameserver Summary(pl.UTF-8): PowerDNS to wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych Name: pdns -Version: 2.9.21.2 -Release: 1 +Version: 4.0.3 +Release: 3 License: GPL Group: Networking/Daemons -Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz -# Source0-md5: 2aa79c1d120a071298340ed2d4e02165 +Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2 +# Source0-md5: bbb1ebed50edc0f2127d6c4331c1429a Source1: http://downloads.powerdns.com/documentation/%{name}.pdf -# Source1-md5: bd027ec8ef6a7ed6d81d40830cdc7ca4 +# Source1-md5: c7f3884185358e59d208e166eddb246c Source2: http://downloads.powerdns.com/documentation/%{name}.txt Source3: %{name}.init Source4: %{name}.conf Source5: %{name}.sysconfig -Patch0: %{name}-configure.patch -Patch1: %{name}-int16.patch -Patch2: %{name}-openldap-2.3.patch -Patch3: %{name}-strerror.patch -Patch4: %{name}-stdlib.patch +Patch1: %{name}-openldap-2.3.patch URL: http://www.powerdns.com/ +BuildRequires: autoconf >= 2.61 +BuildRequires: automake >= 1.11 BuildRequires: bison BuildRequires: boost-devel >= 1.35.0 BuildRequires: flex BuildRequires: libpq++-devel BuildRequires: libstdc++-devel +BuildRequires: libtool +BuildRequires: lua-devel >= 5.1 BuildRequires: mysql-devel BuildRequires: openldap-devel >= 2.4.6 -BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: polarssl-devel >= 1.1 +BuildRequires: rpmbuild(macros) >= 1.647 BuildRequires: sed >= 4.0 BuildRequires: sqlite3-devel BuildRequires: zlib-devel +Requires(post,preun,postun): systemd-units >= 38 Requires(post): sed >= 4.0 Requires(post,preun): /sbin/chkconfig Requires(postun): /usr/sbin/groupdel @@ -39,6 +45,7 @@ Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd Requires: rc-scripts +Requires: systemd-units >= 0.38 Provides: group(djbdns) Provides: nameserver Provides: user(pdns) @@ -126,11 +133,7 @@ LDAP. %prep %setup -q -%patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 cp %{SOURCE1} . cp %{SOURCE2} . cp %{SOURCE4} . @@ -141,23 +144,24 @@ cp %{SOURCE4} . %build CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\"" +%{__libtoolize} +%{__aclocal} -I . +%{__autoconf} +%{__automake} %configure \ - --libdir=%{_libdir}/%{name} \ + --disable-silent-rules \ --sysconfdir=%{_sysconfdir}/%{name} \ --disable-static \ - --enable-ldap \ - --enable-mysql \ - --enable-pgsql \ - --enable-sqlite3 \ + --with-lua \ --with-pgsql-includes=%{_includedir} \ --with-pgsql-lib=%{_libdir} \ --with-mysql-includes=%{_includedir} \ --with-mysql-lib=%{_libdir} \ - --with-sqlite3-includes=%{_includedir} \ - --with-sqlite3-lib=%{_libdir} \ --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \ --with-modules="" \ - --with-socketdir=/var/run + --with-system-polarssl \ + --with-socketdir=/var/run \ + --with-systemd=%{systemdunitdir} %{__make} @@ -168,12 +172,15 @@ install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfi %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} -install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf -install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns +cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} +cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf +cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns # useless - modules are dlopened by *.so -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la + +# we put that in using %doc +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT @@ -183,6 +190,7 @@ rm -rf $RPM_BUILD_ROOT %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns %post +%systemd_post %{name}.service # dirty hack so the config file is processed correctly, and server does not respawn sed -i -e 's/^ *//' /etc/pdns/pdns.conf @@ -194,35 +202,68 @@ if [ "$1" = "0" ]; then %service pdns stop /sbin/chkconfig --del pdns fi +%systemd_preun %{name}.service %postun if [ "$1" = "0" ]; then %userremove pdns %groupremove djbdns fi +%systemd_reload %files %defattr(644,root,root,755) -%doc ChangeLog HACKING INSTALL README TODO pdns.pdf pdns.txt +%doc INSTALL README pdns.pdf pdns.txt %attr(754,root,root) /etc/rc.d/init.d/%{name} %dir %{_sysconfdir}/%{name} %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns -%attr(755,root,root) %{_sbindir}/* -%attr(755,root,root) %{_bindir}/* +%{systemdunitdir}/pdns.service +%{systemdunitdir}/pdns@.service +%attr(755,root,root) %{_sbindir}/pdns_server +%attr(755,root,root) %{_bindir}/dnspcap2protobuf +%attr(755,root,root) %{_bindir}/pdns_control +%attr(755,root,root) %{_bindir}/pdnsutil +%attr(755,root,root) %{_bindir}/zone2json +%attr(755,root,root) %{_bindir}/zone2ldap +%attr(755,root,root) %{_bindir}/zone2sql %dir %{_libdir}/%{name} -%{_mandir}/man8/* +%{_mandir}/man1/calidns.1* +%{_mandir}/man1/dnsbulktest.1* +%{_mandir}/man1/dnsgram.1* +%{_mandir}/man1/dnspcap2protobuf.1* +%{_mandir}/man1/dnsreplay.1* +%{_mandir}/man1/dnsscan.1* +%{_mandir}/man1/dnsscope.1* +%{_mandir}/man1/dnstcpbench.1* +%{_mandir}/man1/dnswasher.1* +%{_mandir}/man1/dumresp.1* +%{_mandir}/man1/ixplore.1* +%{_mandir}/man1/nproxy.1* +%{_mandir}/man1/nsec3dig.1* +%{_mandir}/man1/pdns_control.1* +%{_mandir}/man1/pdns_notify.1* +%{_mandir}/man1/pdns_server.1* +%{_mandir}/man1/pdnsutil.1* +%{_mandir}/man1/saxfr.1* +%{_mandir}/man1/sdig.1* +%{_mandir}/man1/zone2json.1* +%{_mandir}/man1/zone2ldap.1* +%{_mandir}/man1/zone2sql.1* %files backend-gmysql %defattr(644,root,root,755) +%doc modules/gmysqlbackend/*schema.mysql.sql %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so* %files backend-gpgsql %defattr(644,root,root,755) +%doc modules/gpgsqlbackend/*schema.pgsql.sql %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so* %files backend-gsqlite3 %defattr(644,root,root,755) +%doc modules/gsqlite3backend/*schema.sqlite3.sql %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so* %files backend-pipe